Subdomain, how to change the docroot?

wdeboer

Verified User
Joined
Jul 16, 2005
Messages
40
Does anyone know how to make a subdomain on a DA server, in such way the subdomain wouldn't be available as subdirectory on the domain?

Like when you got mysub.mydomain, you now can visit it also at mydomain/mysub.

Only I wouldn't like that! Would it be possible to change the docroot for the subdomains to like /domains/mysub/public_html instead?
 
you have to edit /usr/local/directadmin/data/users/user/httpd.conf

and add a ServerAlias sub.domain.com

the line should look like
ServerAlias www.domain.com domain.com sub.domain.com
 
Last edited:
Back
Top