I just spent way too much time this afternoon trying to get this simple task figured out and thought I would post this to help anyone else who needs to edit the open base directory value for a specific domain on a LAMP server. I found out that I was barking up the wrong tree trying to do by editing httpd.conf, php.ini or .httaccess files. vhost.conf is the answer!

1) Steer yourself to: /var/www/vhosts/yourdomain.com/conf/
cd /var/www/vhosts/yourdomain.com/conf/

2) Create a new file: vhost.conf
vi vhost.conf
3) This goes inside that new vhost.conf file:
<Directory /var/www/vhosts/domain.com/httpdocs>
php_admin_value open_basedir none
</Directory>

4) Save and close the file:
crtl +C
:wq

5) Execute the following command so the changes take hold:
/usr/local/psa/admin/bin/websrvmng -v -a
/etc/init.d/httpd configtest

6) If you get Syntax OK, you’re good to go, restart Apache:
/etc/init.d/httpd restart

No more annoying restrictions.


Return to Top

How To Turn Off open_basedir Restriction For a Specific Domain in Plesk

LATEST ENTRIES ::