Networking, Programming and Graphics Tutorials

Change open_basedir under Plesk [1/1]

Type: Code Networking, Programming and Graphics Tutorials
Change open_basedir under Plesk
Level: Beginner Networking, Programming and Graphics Tutorials 
Change open_basedir under Plesk
Date: 2007-Apr-22
Change open_basedir under Plesk
Visited: 3310 times
Change open_basedir under Plesk
Rating: Change open_basedir under Plesk
Change open_basedir under Plesk
Author: Tony Potter

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/domain.com/ (on Fedora with Plesk) or /usr/local/psa/home/vhosts/domain.com (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:

<Directory /var/www/vhosts/somedomain.com/httpdocs>
php_admin_flag engine on
php_admin_value open_basedir none
</Directory>
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"
</Directory>

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.



<VirtualHost 192.168.0.0:80>
        ....
        Include $DOMAIN$/conf/conf/vhost.conf
</VirtualHost>
<VirtualHost 192.168.0.0:443>
        ....
        Include $DOMAIN$/conf/conf/vhost_ssl.conf
</VirtualHost>
Rate this tutorial:                    
Networking, Programming and Graphics Tutorials - Change open_basedir under Plesk [1/1] - Networking, Programming and Graphics Tutorials

Need a specific tutorial? Do not hesitate and submit a request!
Related Tags: plesk change open_basedir  plesk change open_basedir  open_basedir plesk change  change open_basedir plesk 8.4  open_basedir change with plesk  change open_basedir plesk  open_basedir change plesk ssh  plesk open_basedir  plesk open_basedir  open_basedir + Plesk