website Server Alias
hey!
could some one help troubleshoot i need to be able to open my website without necessarily placing a www. in the address bar configs below @ IN SOA ns1.m.com. admin.m.com. ( 20070932 ; 3h ; 1h ; 1w ; 10h ) ; IN NS ns1.m.com. IN NS ns2.m.com. IN MX 10 smtp.m.com. IN A 1.1.1.1 ****is this the problem ? what does this acheive? ns1 IN A 1.1.1.1 ns2 IN A 2.2.2.2 www IN A 3.3.3.3 smtp IN A 4.4.4.4 ns1 IN A 1.1.1.1 ns2 IN A 2.2.2.2 my vhosts file for the website is as follows <VirtualHost 3.3.3.3:80> ServerAdmin admin@m.com ServerName www.m.com ServerAlias m.com DocumentRoot /www//html ScriptAlias /cgi-bin/ /www//html/cgi-bin/ ErrorLog /www//logs/error_log </VirtualHost> if i ping m.com it resolves to ns1.m.com if i put www.m.com the website site opens however i would like to be able to put m.com in the address bar without the www and have it resolve the to the website. thanks |
You should add
Code:
@ IN A 3.3.3.3 Regards |
thanks for the quick response
adding 3.3.3.3 allows me to resolve *.m.com e.g m.m.com however it does not resolve for m.com without the anything before the m, any more suggestions thanks |
@ is the origin record and it should be the same as the domain name. You can use
Code:
m.com. IN A 3.3.3.3 |
i'm thinking the problem is with the alias,
here's why : - i have several vhosts files and even after removing IN A 1.1.1.1 it will still resolve *.m.com and not m.com any other ideas thanks |
The ServerAlias in your vhost is correct. What is the output of:
Code:
nslookup m.com |
Also I always make the ServerAlias in the httpd.conf file as the www or *.domain.com like:
Code:
<VirtualHost 3.3.3.3:80> |
here's the output
a ping will use round robin and to resolve *.m.com but not m.com neither will the page load m.com i'll need to look into this closer away from the production server [root@webs vhosts]# nslookup m.com Server: 2.2.2.2 Address: 1.1.1.1#53 Name: m.com Address: 2.2.2.2 [root@webs vhosts]# nslookup www.m.com Server: 2.2.2.2 Address: 1.1.1.1#53 Name: m.com Address: 2.2.2.2 |
is it possible to ping a server alias ?
how do i go about testing this ? |
Of course you can ping a server alias, since it resolves to a valid IP address.
What I don't understand is the output of the nslookup commands in your previous post. How can "Server" and "Address" be different? How about running nslookup using the dns IP: Code:
nslookup m.com 1.1.1.1 |
All times are GMT -5. The time now is 07:44 AM. |