• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

open_basedir for subdomains?

T

tincup

Guest
Hi. I don't know if this is off-topic in here but my web server is Plesk controlled.

I need to extend the PHP open_basedir of one of my subdomains by "/usr/share/php". So I create a file "vhost.conf" at

/var/www/vhosts/domainname.com/subdomains/subdomainname/httpdocs

with the contents

<Directory /var/www/vhosts/domainname.com/subdomains/subdomainname/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/domainname.com/subdomains/subdomainname/httpdocs:/tmp:/usr/share/php"
</Directory>

This did not work. Does anyone know why?
 
Ok, got it working. This is what I did...

contained the php_admin_value open_basedir directive in:

<Directory foo/bar/httpdocs>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_value open_basedir "blabla"
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_value open_basedir "blabla"
</IfModule>
</Directory>

Hope it helps. I'm sure there's some redundancy there that can be cut out.
 
I have copied your code exactly, placing it in a vhost.conf file in the httpdocs folder of the subdomain as described in the first post and nothing happens!

I have restarted the httpd service and ran the following command as suggested in another thread:
/usr/local/psa/admin/sbin/websrvmng -a -v

But still nothing!

Can anyone help!
 
Thanks for your reply. Should have posted back to let everyone know I sorted it in the end after a bit of trial and error and a late night!
 
Back
Top