I wished to run example.com on my local test server (Win XP). For this I was able to setup BIND and configured zones for example.com. The local DNS server and local Apache web server both work well. However when I try example.com on browser it takes me to the original example.com not to the local version.
So what am I missing here? Why can't example.com point to the local version in Apache.
zone record for example.com
$TTL 3h example.com. IN SOA ns1.example.com. ns2.example.com. ( 1 ; Serial 3h ; Refresh after 3 hours 1h ; Retry after 1 hour 1w ; Expire after 1 week 1h ) ; Negative caching TTL of 1 hour ; ; Name servers ; example.com. IN NS ns1.example.com. ; ; Addresses for the canonical names ; localhost IN A 127.0.0.1 ns1 IN A 192.168.1.2
- ISC BIND service is running.
- Apache is running.
- Dig @192.168.1.2 example.com - shows expected results.
- Changed my primary DNS to 192.168.1.2
- Not using any proxy. Everything works from the same box. Browser, DNS and Apache.
What to do to make local example.com work?
I tried -
nslookup example.com got the following response -
;; Got recursion not available from 192.168.1.2, trying next server Server: 184.108.40.206 Address: 220.127.116.11#53 Non-authoritative answer: Name: example.com Address: 18.104.22.168
For nslookup 192.168.1.2 I got -
;; Got recursion not available from 192.168.1.2, trying next server ;; Got recursion not available from 192.168.1.2, trying next server Server: 22.214.171.124 Address: 126.96.36.199#53 ** server can't find 188.8.131.52.in-addr.arpa.: NXDOMAIN
Dig example.com, I got -
; <<>> DiG 9.6.1 <<>> example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 494 ;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;example.com. IN A ;; AUTHORITY SECTION: example.com. 3600 IN SOA ns1.example.com. ns2.example.com. 1 10800 3600 604800 3600 ;; Query time: 15 msec ;; SERVER: 192.168.1.2#53(192.168.1.2) ;; WHEN: Sat Jul 04 17:05:05 2009 ;; MSG SIZE rcvd: 73