Hi, i'm having a problem with a virtual host. Well actually all of them. When someone try to access for example
www.domain.com it works great, my server act as the virtual host of that domain. But if someone try to access domain.com my server doesn't act as it's virtual host and just redirect it to "/".
I hope someone could help me to solve this.
Here is the virtual host conf
Code:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.domain.com
DocumentRoot "/var/www/domain.com"
</VirtualHost>
Here is the master dns conf
Code:
$TTL 86400
; Authoritative data for domain.com
;
@ IN SOA ns1.domain.com. root.domain.com. (
1139830917 ; Serial (yymmddxx)
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
domain.com. IN NS ns1.domain.com.
domain.com. IN NS ns2.domain.com.
domain.com. IN NS ns3.domain.com.
MX 0 mail
domain.com. IN A my_webserver_ip
ns1 IN A my_first_dns_ip
ns2 IN A my_second_dns_ip
ns3 IN A my_third_dns_ip
mail IN A my_mailserver_ip
www CNAME domain.com.
Another question, why dns is so hard to conf?