Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Adding a subdomain pointing to custom folder  (Read 2271 times)

0 Members and 1 Guest are viewing this topic.

Vinil

  • Guest
Adding a subdomain pointing to custom folder
« 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