/ Published in: Apache
                    
                                        
If you have an open_basedir restriction that is causing issues with a domain, you can remove the restriction easily. First, put the following text in /home/httpd/vhosts/[domain]/conf/vhost.conf:
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
<Directory /home/httpd/vhosts/[domain]/httpdocs>
php_admin_flag engine on
php_admin_value open_basedir none
</Directory>
# If there was already a vhost.conf in the directory, then just reload Apache. Otherwise, run the magic wand:
/usr/local/psa/admin/bin/websrvmng -av
# Then bounce Apache:
/etc/init.d/httpd reload
# BUT, if the client has both php4 and php5 things get a little more complicated, and you have to add the "IfModule" directive from the apache syntax, e.g.:
< Directory /var/www/vhosts/domain.com/subdomains/SUBDOMAIN/httpdocs>
< IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir none
< /IfModule>
< IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir none
< /IfModule>
Options +Includes -ExecCGI
< /Directory>
# Or if you want to add a new location to open_basedir instead of disabling open_basedir, you would have:
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs:/tmp:/new/path/comes/here"
URL: https://www.solarvps.com/forums/index.php?topic=359.0
Comments
 Subscribe to comments
                    Subscribe to comments
                
                