subdomain creation

2 posts / 0 new
Last post
#1 Fri, 02/08/2013 - 12:26
edwardsmarkf

subdomain creation

hello all -

i had a bit of an emergency where i needed to create a subdomain. i could not remember (or never learned) how to do this in virtualmin, so i CHEATED and edited the httpd.conf file. here is what i added:

< VirtualHost xx.10.xx.xx:80 >
    ServerName example.marky.com
    ServerAlias www.example.marky.com
    DocumentRoot /home/marky.com/public_html/examplewebsite
< / VirtualHost >

i had hoped that this change would show up somewhere in virtualmin so i could "reverse-engineer" what i was supposed to have done, rather than cheat.

i did see there was a cool looking sub-server option, but i could not quickly see where i could specify a different DocumentRoot.

suggestions?

thank you all !

Fri, 02/08/2013 - 22:36
tpnsolutions
tpnsolutions's picture

Hi,

Subdomains are depreciated in Virtualmin in favor of the more powerful "Sub-Server" feature. Sub-Servers do not get setup under the primary domain like you were trying to do, and there is no way to change this by design.

Here's the hierarchy to help explain how things work:

"Top-Level" domain:

/home/username

"Sub-Server" domain:

/home/username/domains/sub-server.domain.com/

This method allows both domains to have their own isolated place within the file tree which is more powerful than simply making a sub-directory under the "public_html" directory of the "top-level" domain.

Hope this is helpful!

Best Regards,
Peter Knowles
TPN Solutions

E: pknowles@tpnsolutions.com
P: 604-782-9342
W: http://www.tpnsolutions.com
Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Topic locked