Tuesday, July 25, 2006

Plesk and open_basedir

I'm using Plesk as a virtual server solution and have had some quesitons about accessing files outwith the vhosts home httpdocs directory.

This is not possible as default using Plesk. You need to override the open_basedir restriction by placing a file called vhost.conf in the /var/www/vhosts/**domain.com**/conf / directory.
<directory>
php_admin_value open_basedir "/var/www/vhosts/**domain**/httpdocs:/tmp:***directory/***"
</directory>
Save it and then restart the appropriate services with:
sudo /opt/psa/admin/sbin/websrvmng -v -a
You also need to ensure that the domain has PHP safe mode switched off:
Menu -> Domains -> domain.com -> Setup
uncheck the safe mode box (near the bottom of the page)
This will create configuration files for all domains and restart the appropraite services.

No comments: