Multiple domains to one directory

travlang

Verified User
Joined
Sep 8, 2004
Messages
7
Location
Boca Raton, FL
I have set up Several domains for DA. I now what to add more domains, but I don't want them to have their own directorys. I want all these domains (not subdomains) to point to one domain
For example.
I want for mydomain1.com, mydomain2.com, mydomain3.com to all resolve to domain.com. I have tried to use the ServerAlias, but that doesn't work. I think I am missing a step.
Any help would be appreciated.

Howard
 
Why not use the "Domain pointer" function in the user-controlpanel? That should work. I use it for that purpose all the time. (make sure the option "create as an alias" is checked)
 
Aspegic said:
Why not use the "Domain pointer" function in the user-controlpanel? That should work. I use it for that purpose all the time. (make sure the option "create as an alias" is checked)

What does create an alias actually do?

Phil
 
The way I understand it is that if you only create a domainpointer without an alias, only the DNS zone records will be created for the new domain.
If you enable the option to create an alias, then also a virtualhosts entry for that domain will be added to apache's httpd.conf (a "ServerAlias" entry).
Without the alias, the only thing that would happen is that the domain would resolve to the correct IP address but you wouldn't be able to access the website at that address because apache wouldn't know which website to serve (that's what the virtualhosts entry is for).

If this explanation is incorrect in any way I'm sure someone here will correct me ;)
 
Last edited:
Creating as an alias simply adds a line to the httpd.conf container for the site, adding another domain name. So both domain names go to the same directory.

Jeff
 
You can set domain pointer (at User Level) by going to Home -> Domain Pointers (in the Advanced Features section at the bottom of the page). Here you can choose to check 'Create as an alias', I did so for my domain critical, but not so for my criticalm domain. This results in the overview attached below.

The effect of this will be in both cases that the content from 'sourcedomain.com' will show up when visiting either URL. However, in the case of criticalm/some-path the URL will be replaced by sourcedomain.com/some-path. While visiting criticalt/some-path will keep it's own URL

Selection_257.png
 
Back
Top