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

Subdomain vhost.conf

P

phibster

Guest
I have been trying to change the open_basedir restriction on a single subdomain to allow a 3rd directory. I have followed the example given here (this is for adding www.subdomain.domain.com but same principle). I created the vhost.conf file in the right folder and placed the following line:

PHP:
php_admin_value open_basedir "/home/httpd/vhosts/domain/subdomains/subdomain/httpdocs:/home/httpd/vhosts/domain/subdomains/secondsubdomain/httpdocs:/tmp"

I then executed /usr/local/psa/admin/sbin/websrvmng -v -a to update the server. I then tested the basedir restriction and it hadn't changed. I restarted the httpd service. Still no go. What am i doing wrong? Is it a case of not being able to reassign that value once it has been set? If so how else can I get around this?
 
You should try something more like this:

<Directory "/home/httpd/vhost/domain.com/httpdocs">
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_value open_basedir "paths_here"
</IfModule>
</Directory>
 
Cheers worker. Worked like a charm. Put that code in, executed the websvrmng command and bing it works.
 
Back
Top