Author Topic: [How?] Subdomain of main domain go to user folder  (Read 6069 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
[How?] Subdomain of main domain go to user folder
« on: July 20, 2016, 07:03:31 PM »
Hi!

My main domain of VPS server: MYcompany.com

I created a user account: sub1.mycompany.com

But, accessing this subdomain (sub1) is going to main domain...

I want create a subdomain account of main domain and this subdomain have its own folder and own ftp user.... :)

The VHOST of the created subdomain:

Code: [Select]
# vhost_start sub1.mycompany.com
<VirtualHost XX.XXXX.XXX.XX:80>
ServerName sub1.mycompany.com
ServerAlias www.sub1.mycompany.com
ServerAdmin mail@mail.com
DocumentRoot "/home/sub1/public_html"
ScriptAlias /cgi-bin/ "/home/sub1/public_html/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/sub1/sub1.mycompany.com/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup sub1 sub1
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup sub1 sub1
        suPHP_ConfigPath /home/sub1
</IfModule>

<Directory "/home/sub1/public_html">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end sub1.mycompany.com


Thanks a lot. :)
« Last Edit: July 20, 2016, 07:05:24 PM by hunter »