• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

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