• 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/

PHP Open dir

P

Peter Blackford

Guest
I am having problems changing the PHP Open_Dir for a domain. I have tried changing the conf/httpd.include to change the open_dir setting. I then run websrvmng -v -a (although I have tried a combination of things). The httpd.include file is then overwritten and removing my modification.

What am I doing wrong?
 
Never mind fixed it.

I had to create the file conf/vhost and run the command and the included the vhost in the httpd.include file.
 
You should never edit the httpd.include file for a domain. It will always be overwritten. You will need to create a vhost.conf file to set the PHP open_basedir value.

<DirectoryMatch /var/www/vhosts/yourdomain/httpdocs>
php_admin_value open_basedir none
</DirectoryMatch>

For good measure I would also restart Apache, though it might not be required.
 
Back
Top