Admin-Ahead Community

Linux => Control Panels => Plesk => Topic started by: Vinil on November 20, 2013, 09:01:16 pm

Title: Adding a subdomain pointing to custom folder
Post by: Vinil on November 20, 2013, 09:01:16 pm
If a website required domain sub.domain.com to point to a folder inside main site webroot, we can do it by:


1). Open /var/www/vhosts/domain.com/subdomains/sub/conf/vhost.conf in editor.

2). Add to it the following contents (for sub.domain.com):

Code: [Select]
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>



3). Then reconfigure Plesk by using command

Quote
# /usr/local/psa/admin/bin/websrvmng -a