I have an Ubuntu+Virtualmin server with multiple sites on board. Sites are working fine but for some reason "www." and other subdomains are not resolving.
My server IP is 107.170.xxx.xx. If I add this record to my /etc/hosts on local machine, I can access www.site.com, so Apache2 is working correctly:
> site.com Server: 200.30.xxx.xx Address: 200.30.xxx.xx#53 Non-authoritative answer: Name: site.com Address: 107.170.xxx.xx > www.site.com Server: 200.30.xxx.xx Address: 200.30.xxx.xx#53 ** server can't find www.site.com: NXDOMAIN
BIND9 record similar for all sites (I tried CNAME but no luck):
$ttl 38400 @ IN SOA host-domain.com. root.host-domain.com. ( 140xxx7595 10800 3600 604800 38400 ) @ IN NS host-domain.com. site.com. IN A 107.170.xxx.xx www.site.com. IN A 107.170.xxx.xx ftp.site.com. IN A 107.170.xxx.xx m.site.com. IN A 107.170.xxx.xx localhost.site.com. IN A 127.0.0.1 webmail.site.com. IN A 107.170.xxx.xx admin.site.com. IN A 107.170.xxx.xx mail.site.com. IN A 107.170.xxx.xx site.com. IN MX 5 mail.site.com. site.com. IN TXT "v=spf1 a mx a:site.com ip4:107.170.xxx.xx ?all"