Change open_basedir under Plesk

This tutorial will show you how to change the open_basedir option on a Linux server with Plesk control panel.

Almost all the custom changes that can be made in Plesk but not through the GUI, must be set in vhost.conf file for each domain.

The location of this file is under $DOMAIN$/conf/

$DOMAIN$ should be replaced with a real path to domain home. For example it could be /var/www/vhosts/ (on Fedora with Plesk) or /usr/local/psa/home/vhosts/ (on FreeBSD with Plesk). As you can see this location may vary depending on Plesk version and OS. To find where the vhosts home is look into /etc/psa/psa.conf for HTTPD_VHOSTS_D variable set.

Inside $DOMAIN$/conf/vhost.conf you can change the options with the appropriate apache format. Here is an example about how to set open_basedir with ”none” option:

In case you want to do the same for SSL, just create a file ”vhost_ssl.conf”
Then put the settings inside to be for the secured document root folder :

<Directory $DOMAIN$/httpdocs>
php_admin_value open_basedir "$DOMAIN$/httpdocs:/tmp:/ADD_PATH"

There is one thing you have to do for appropriate using of $DOMAIN$/conf/vhost.conf . You must include this file into $DOMAIN$/conf/httpd.include like in the example bellow.

When you are ready just restart the apache server.


Filed Under: Plesk Control Panel

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Comments (1)

  1. Jan says:

    Very useful explenation, I have been looking for this for quite a while. You don’t have to include the vhost.conf in the httpd.include file though, Plesk does that automatically.

Leave a Reply