howto: turn off open_basedir in Plesk

How to turn off open_basedir in Plesk?

By default Plesk applies open_basedir restriction for all the domains on the server. You can remove the open_basedir restriction lines from the httpd.include file located at /home/httpd/vhosts/example.com/conf/ directory but Plesk will overwrite the file again once it rebuild the include files.

To permanently remove the open_basedir restrictions for a domain, create a vhost.conf file

vi /home/httpd/vhosts/example.com/conf/vhost.conf

and place the following lines:

<Directory /home/httpd/vhosts/example.com/httpdocs/>
php_admin_value open_basedir none
</Directory>

Once done, rebuild the include file with the command:

/usr/local/psa/admin/bin/websrvmng -a

and restart the Apache service:

service httpd restart

To verify the new settings, place a phpinfo.php file under the account, browse the file and check the “Local Value” column.

This entry was posted on Thursday, December 3rd, 2009 and is filed under Plesk Management. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.