How to override open_basedir settings in Plesk

Plesk will overwrite any httpd.conf settings unless you include them in…

/home/httpd/vhosts/DOMAIN/conf/vhost.conf

basically, the instruction everywhere on the web on how to modify the open_basedir for plesk, so it won’t overwrite it, were all wrong…

here’s the instruction from the Plesk website:

http://kb.parallels.com/en/432

<Directory /home/httpd/vhosts/DOMAIN/httpdocs>
php_admin_value open_basedir “/home/httpd/vhosts/DOMAIN/httpdocs:/tmp:/usr/bin:/usr/local/bin”
</Directory>

this didn’t work because the the plesk httpd.include (which gets overwritten each time) used the “IfModule sapi_apache2.c” call, which MUST ALSO be used in the vhost.conf (which overrides)…

here is the correct way of inputing the vhost.conf:

<Directory /home/httpd/vhosts/DOMAIN/httpdocs>
<IfModule sapi_apache2.c>
php_admin_value open_basedir “/home/httpd/vhosts/DOMAIN/httpdocs:/tmp:/usr/bin:/usr/local/bin”
</IfModule>
</Directory>

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.