• We value your experience with Plesk during 2025
    Plesk strives to perform even better in 2026. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2025.
    Please take this short survey:

    https://survey.webpros.com/

Vhost.conf not working as intended

G

GSteer

Guest
Hi,

I have a modified vhost.conf file to try and allow php to access the /private folder for running scripts.

<Directory /var/www/vhosts/*domain*/httpdocs>
php_admin_value open_basedir none
</Directory>

<Directory /var/www/vhosts/*domain*/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/*domin*/httpdocs:/var/www/vhosts/*domain*/private"
</Directory>

But I still get the following error:

Warning: main(): open_basedir restriction in effect. File(../private/test.php) is not within the allowed path(s): (/var/www/vhosts/*domain*/httpdocs:/var/www/vhosts/*domain*/private) in /var/www/vhosts/*domain*/httpdocs/index.php on line 3
 
Sorry if you've already done so, but did you run /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<domain_name>

Also did you then restart apache? (e.g. service httpd restart in a redhat-type linux flavour)
 
Back
Top