My webserver is running Plesk and for each new site a vhost.conf file is created that has some include_path and open_basedir settings in it:

    <Directory /var/www/vhosts/website.nl/httpdocs>
php_admin_value open_basedir "/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global:/tmp:/var/www/vhosts/website.nl/httpdocs"
php_value include_path "/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global"

Is it possible to add another for this site and have the include_path and open_basedir setting change for a subdirectory like this:

    <Directory /var/www/vhosts/website.nl/httpdocs/subdirectory>
php_admin_value open_basedir "/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global2:/tmp:/var/www/vhosts/website.nl/httpdocs/subdirectory"
php_value include_path "/usr/share/pear:/var/www/vhosts/global.website.nl/httpdocs/global2"

If you meant .../domain.com/conf/vhost.conf file - these files are solely for customization, so you can include there whatever other settings you like.

But I guess you mean the autogenerated config of Plesk. If so, there would be 2 paths to add the lines you want

  1. if you are on Plesk 11.0 and /var/www/vhosts/website.nl/httpdocs/subdirectory has a site assigned, then you can tune open_basedir and include_path in PHP settings of the site
  2. if there are no site assigned, but you are on Plesk 10+, you can modify PHP templates used for the config generation. Read more about Changing Virtual Hosts Settings Using Configuration Templates
  • Thanks, it worked out changing the domain's vhost.conf. But thanks for the tip and link!
    – tvgemert
    Nov 13 '12 at 13:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.