PDA

View Full Version : php_admin_value open_basedir


stefanr
21st February 2006, 11:48
Hello,

i have setup the ISPConfig. Then i creat a lot of virtual host (domains) and one ssl-Domain for my Server, this domain called ssl.rr-netz.de. Then I will create subdir in this domain wich shows of other domains on the server, like
ssl.rr-netz.de/user1
ssl.rr-netz.de/user2
ssl.rr-netz.de/user3

so all users on the server can use a ssl domain, without everyone must buy a own ip & zertifikat. This works fine, but i have a problem with php_admin_value open_basedir

#
#
#
######################################
# Vhost: www.ssl.rr-netz.de:80
######################################
#
#
<VirtualHost 192.168.50.100:80>
Alias /shops/carhifi-zentrum/ '/var/www/web5/web/'
<Directory '/var/www/web5/web/'>
Order allow,deny
Allow from all
</Directory>
ServerName www.ssl.rr-netz.de:80
ServerAdmin webmaster@ssl.rr-netz.de
DocumentRoot /var/www/web15/web
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web15/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web15/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web15/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web15/phptmp/
php_admin_value session.save_path /var/www/web15/phptmp/
Alias /error/ "/var/www/web15/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
</VirtualHost>
#
<IfModule mod_ssl.c>
<VirtualHost 192.168.50.100:443>
Alias /shops/carhifi-zentrum/ '/var/www/web5/web/'
<Directory '/var/www/web5/web/'>
Order allow,deny
Allow from all
</Directory>
ServerName www.ssl.rr-netz.de:443
ServerAdmin webmaster@ssl.rr-netz.de
DocumentRoot /var/www/web15/web
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web15/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web15/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web15/:/var/www/web5/web/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web15/phptmp/
php_admin_value session.save_path /var/www/web15/phptmp/
SSLEngine on
SSLCertificateFile /var/www/web15/ssl/www.ssl.rr-netz.de.crt
SSLCertificateKeyFile /var/www/web15/ssl/www.ssl.rr-netz.de.key
Alias /error/ "/var/www/web15/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
</VirtualHost>
</IfModule>


the Problem is that the ISPConfig always override my /etc/apache2/vhosts/Vhosts_ispconfig.conf and i have no chance to insert this entry into the Vhosts_ispconfig.conf.
Have anyone a idea for this problem?

STEFAN

till
21st February 2006, 12:16
Have you tried to insert this line:

php_admin_value open_basedir /var/www/web15/:/var/www/web5/web/

In the apache directives field of the website. The values of the pacahe directives field is inserted at the end of the vhost, so it might override the previously defined value. But I've not tested it :)

stefanr
21st February 2006, 12:56
ok, i have check this idea, but the problem is that for the domain ssl.rr-netz.de a host with port :80 and port :443 exist. This ok but when i insert
php_admin_value open_basedir /var/www/web15/:/var/www/web5/web/
into the Apache Direktiven (Optional): then in the vhost file the entry in both host replaced (:80 & :443) but only the :443 host must be replaced.

falko
21st February 2006, 19:07
In this case you must change the code in the function make_vhosts() in /root/ispconfig/scripts/lib/config.lib.php.