For security reasons I've put my yii folder underneath the html root, so my structure appears like this


when running the website I recieve a mistake open_basedir restriction essentially that yii.php that is known as by index.php from httpdocs isn't within the permitted path. As this website is a subdomain will i edit the vhosts.conf from the primary domain or from the subdomain?

An amount the correct setting be to permit


road to be around?



So my /var/www/vhosts/ file appears like this now:

AddHandler fcgid-script .php
<Directory /var/www/vhosts/>
php_admin_value open_basedir ".:/var/www/vhosts/"
FCGIWrapper /var/www/vhosts/ .php
Options +ExecCGI +FollowSymLinks
allow from all

I have reconfigured and restarted the net server however i get the mistake:

Warning: require_once() [function.require-once]: open_basedir restriction in effect. 
File(/var/www/vhosts/ is not within the allowed path(s): 
in /var/www/vhosts/ on line 26

Within the virtualhost:

php_admin_value open_basedir ".:/var/www/vhosts/"

I discovered the solution. You need to specify the various modules otherwise simply editing the vhost file doens't cash of the effect. This really is to show from the open_basedir however, you can edit the configurations accordingly.

<Directory /var/www/vhosts/YOURDOMAIN.COM/subdomains/YOUSUBDOMAIN/httpdocs>
  <IfModule sapi_apache2.c>
  php_admin_value open_basedir none
<IfModule mod_php5.c>
  php_admin_value open_basedir none


# /usr/local/psa/admin/bin/websrvmng --reconfigure-vhost --vhost-name=YOURDOMAIN.COM
# apachectl stop
# apachectl start

Full article are available here: