Wildcard subdomain use another subdomains DocRoot

binternet

New member
Joined
Jan 22, 2018
Messages
1
I Have an account with the following domains:
HTML:
[FRONT WEBSITE] mysite.com = /home/mysite/domains/mysite.com/public_html
[ACCOUNT AREA] account.mysite.com = /home/mysite/domains/account.mysite.com/public_html
[WORK AREA] workarea.mysite.com = /home/mysite/domains/workarea.mysite.com/public_html

I would like to add a wildcard subdomain setup that will serve the workarea subdomain's public_html
HTML:
*.mysite.com = /home/mysite/domains/workarea.mysite.com/public_html

I've already added * to point the IP address of the server to allow subdomain wildcard.

I've also read https://help.directadmin.com/item.php?id=127 , the problem is that applying
HTML:
ServerAlias *.|DOMAIN|
redirects to the main domain's public_html folder and not workarea.mysite.com's public_html folder.

How can I achieve my desired setup?
 
Hello,

Tried?

Code:
|*if [COLOR=#333333]DOMAIN="[/COLOR][COLOR=#333333]workarea.mysite.com"[/COLOR]|
    ServerAlias [COLOR=#333333]*.mysite.com[/COLOR]
|*endif|
 
Back
Top