Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Alias under Linux / Apache

Status
Not open for further replies.

Mlima

Programmer
Jan 3, 2001
15
BR
Hi, friends:

I want to have, for instance, as a real Domain, and as just an alias, so that when browsing to any of them it can bring the same homepage, that is, abc.com.br. In this case, xyz.com.br wouldn´t have a home or web directory, nor email, nor ftp.

I configured the file systems as below (I changed the true domain names, this is just an example), but it is not working. abc is reachable, but xyz is not. Maybe something is wrong or I forgot something. Please, review the files and tell me this. Thanks a lot.

Mario./

/var/named/abc.com.br file:
---------------------------

$TTL 48200
@ IN SOA ns.multisitesdominios.com.br. webmaster.multisitesdominios.com.br. (
2001060303 ; serial
10800 ; refresh
3600 ; retry
604800 ; expire
86400 ; default_ttl
)
IN NS ns.multisitesdominios.com.br.
IN NS ns2.multisitesdominios.com.br.
IN MX 10 mail
IN A 200.201.129.12
;
www IN A 200.201.129.12
ftp IN A 200.201.126.12
mail IN A 200.201.129.12
smtp IN A 200.201.129.12
pop IN A 200.201.129.12

/var/named/xyz.com.br file:
---------------------------

$TTL 48200
@ IN SOA ns.multisitesdominios.com.br. webmaster.multisitesdominios.com.br. (
2001060403 ; serial
10800 ; refresh
3600 ; retry
604800 ; expire
86400 ; default_ttl
)
IN NS ns.multisitesdominios.com.br.
IN NS ns2.multisitesdominios.com.br.
IN A 200.201.129.12
;

/etc/named.conf entries:
------------------------

zone "abc.com.br"{
type master;
file "abc.com.br";
};

zone "xyz.com.br"{
type master;
file "xyz.com.br";
};

Obs: The secondary /etc/named.conf file is also accordingly configured.

/usr/local/apache/conf/httpd.conf file:
---------------------------------------

<virtualhost 200.201.129.12>
ServerAdmin webmaster@multisitesdominios.com.br
ServerName ServerAlias abc.com.br
ServerAlias DocumentRoot /home/abc/www
ScriptAlias /cgi-bin/ /home/abc/ErrorLog logs/abc-error-log
TransferLog logs/abc-access-log
</virtualhost>

As xyz is just a serveralias for abc, we didn´t create a xyz <virtualhost> block for it.

Thanks.
 
add
www IN A 200.201.129.12
to the end of the /var/named/xyz.com.br file:

you might also have a problem with whomever has authority for .com.br if they don't know where xyz is.
at the .com.br level they could just have a CNAME entry to point xyz.com.br to abc.com.br

good luck!
 
yes... a CNAME record in the xyz.com.br database saying:

IN CNAME
would most certainly map xyz.com.br back to abc.com.br's web site... as long your name server can find the abc.com.br records.... which i can see is not a problem...

but remember to add the correct line in the /etc/httpd/httpd.conf in the Apache server so that it can respond to since this is contained in the HTTP address header... and not
AKNIT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top