Usually, I work with CPanel. But some time ago my friend asked me to move his website to a server with Plesk installed by default. Website required domain sub.domain.com to point to a folder inside main site webroot. I surprizingly found, that with Plesk 9 it is impossible (it was ok with old versions where Plesk allowed to choose subdomain destination folder). I had to find a way to overcome that.
It is easy. But you need to be root for that.
Open /var/www/vhosts/domain.com/subdomains/sub/conf/vhost.conf in editor.
Add to it the following contents (for sub.domain.com):
DocumentRoot /var/www/vhosts/domain.com/httpdocs/sub
<Directory /var/www/vhosts/domain.com/httpdocs/sub>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs:/tmp"
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs:/tmp"
</IfModule>
Options -Includes -ExecCGI
</Directory>





August 24th, 2010 4:45 pm
Hi, great post!!
Very helpful.
By any reason, do you know if this works on version 9.5? I can’t find the vhost.conf
Cheers,
Diogo
August 24th, 2010 4:51 pm
It should work. Just create the file.
August 24th, 2010 5:00 pm
Thanks