I'm trying to set up a web app hosted on my mac in which people on my network can access via http://custom.local/
I can access it on the mac since I have set up an Apache VirtualHost and in /etc/hosts
127.0.0.1 custom.local
I ran $ named-checkconf /etc/named.conf
which didn't return anything,
I ran $ named-checkzone custom.local /var/named/custom.local.zone
on
which returned
zone hercules.local/IN: loaded serial 2012032301
OK
but others on the network still can't access the domain.
I have in /var/named/custom.local.zone
;BIND db file for custom.local
$ORIGIN custom.local.
$TTL 86400
@ IN SOA custom.local. root.custom.local. (
2012032301 ; serial number as yymmddnn
15 ; refresh
3600 ; retry
3000000 ; expire
86400 ; min ttl
)
NS custom.local.
custom.local. IN A 127.0.0.1
and in /etc/named.conf
zone "custom.local" IN {
type master;
file "custom.local.zone";
};
also when I run $ rndc reload
and $ rndc flush
I get
WARNING: key file (/private/etc/rndc.key) exists, but using default configuration file (/private/etc/rndc.conf)
server reload successful
What am I missing?
Best Answer
Are the other computers you're trying to connect from running OS X, or some other operating system? If it's some other OS, you need to configure them to use your Mac as their DNS server (otherwise the lookups for custom.local never get sent to BIND on your computer).
If you're trying to reach it from other OS X computers, things are a bit different because OS X resolves *.local using multicast DNS rather than a standard DNS lookup. To get this working, go to System Preferences on your (server) Mac, open the Sharing pane, and click the Edit button near the top to change your Mac's mDNS name to custom.local.