Domain alias and subdomain

lux

New member
Joined
Jul 20, 2005
Messages
1
Hello,
I've this problem:

I've a domain "domain.com" and a domain alias pointer "domain.net" that point to domain.com.
If I create a subdomain "test.domain.com", how can I make because "test.domain.net" automatically become an alias of test.domain.com?

Thanks!!!
 
Bump for a response. I am looking for the same type of thing to make pointer.com point to domain.com and subdomains following in suit.

So the user adds subdomain.domain.com and subdomain.pointer.com also becomes active.
 
First you'll need to create a zone file for the subdomain.

Second you'll have to add a ServerAlias to the target httpd.conf file.

That may be the sticky part; I don't think you can do that for just a subdomain.

So the answer is that it may only work if the subdomain is created as a domain.

Jeff
 
This has probably been closed/resolved but we have teh following method

Instead of actually adding the sub-domain as a sub-domain, add it as an additional domain. You can then create Domain Pointers on it.

I am going to open a discussion about the possibility of adding Domain Pointers as aliases on sub-domains, or at the very least finding out if this is possible.
linky: http://www.directadmin.com/forum/showthread.php?p=92100#post92100
 
is not so sticky like seems

First you'll need to create a zone file for the subdomain.

Second you'll have to add a ServerAlias to the target httpd.conf file.

That may be the sticky part; I don't think you can do that for just a subdomain.

So the answer is that it may only work if the subdomain is created as a domain.

Jeff

is just two things to change

1) create on the DNS of the domain alias... (DNS Administration) the A records for the subdomain... just like the host domain have.
example
if the subdomain is "test.domain.com"... the DNS of "domain.com" have this A records
test - A - ServerIP
www.test - A - Server IP
exactly that have to be create on the DNS of the domain alias..."domain.net"



2) open a SSH session and find the file httpd.conf of the user
example
if the hosted domain was create by de user "pepe"
the httpd.conf will be "/usr/local/directadmin/data/users/pepe/httpd.conf"

editing the file.. you will see a part like this
-------------------
<VirtualHost IP.SERVER>

ServerName www.test.domain.com
ServerAlias www.test.domain.com test.domain.com
ServerAdmin [email protected]
-------------------

and .. yes.. in the "ServerAlias" line you have to add the alias domain..
like this
-------------------
<VirtualHost IP SERVER>

ServerName www.test.domain.com
ServerAlias www.test.domain.com test.domain.com www.test.domain.net test.domain.net
ServerAdmin [email protected]
-------------------

save the file.. and restart the httpd...

Sorry for my bad english and greeting from Argentina
 
Ramdileo: Your method is of course correct, but the idea of the control panel is that we dont have to go editing files that will be overwritten or forgotten if there is an upgrade of the like.

Any thoughts from DA about this?
 
more data and good news about this

if i create the domain pointer/alias BEFORE of create de subdomain...
the step 2... I mention in the post #5 is not necessary...

when create the alias first and the subdomain later...
the Apache or Directadmin .. put this line automatically
"ServerAlias www.test.domain.com test.domain.com www.test.domain.net test.domain.net"
then is not necessary modify the httpd.conf by hand...

is still necessary make this part by hand
1) create on the DNS of the domain alias... (DNS Administration) the A records for the subdomain... just like the host domain have.
example
if the subdomain is "test.domain.com"... the DNS of "domain.com" have this A records
test - A - ServerIP
www.test - A - Server IP
exactly that have to be create on the DNS of the domain alias..."domain.net"

Sorry for my bad english and greeting from Argentina
 
Sorry to dig up an old thread, but it is a pain to have to go into httpd.conf every time just to add an alias. Would it be possible to do something where we can edit the folder the subdomain points to? Like how cPanel lets you specify if you want a subdomain to point to the home directory.
 
Why can't you use Site Redirection from the DirectAdmin control panel to create a pointer or Alias? Doesn't this work for you?

Jeff
 
Back
Top