Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Apache does not recognize the local zone .dev -- returns 404 Not Found. If Apache is restarted it will recognize the local zon. If inactive for ~1hr it no longer recognizes the local zone -- returns to 404 Not Found.


# /etc/named.conf
zone "dev" IN {
    type master;
    file "";
    allow-update { none; };

Used wildcard subdomains to enable this feature.

share|improve this question
I don't see how this can be something directly related to Apache. How are your hostnames resolving when you can't reach the webserver? – Gerry Jul 11 '12 at 12:27
@Gerry I will get back to you on that, have to wait till it stops working. What gets me though is that when Apache is restarted it works again. To me it seems like a module or service within Apache which shuts down and the restart refreshes it. – Ryan Schumacher Jul 11 '12 at 12:40
Also check Apache's error log. – Gerry Jul 11 '12 at 13:05
@Gerry You were right it isn't Apache, when pinged: ping: cannot resolve Unknown host, but how would restarting Apache fix the issue? – Ryan Schumacher Jul 11 '12 at 14:20
It is named which is having issues, when restarted Apache picked up the domain without needing to be restarted. – Ryan Schumacher Jul 11 '12 at 14:26

Your issue probably is in named.conf. Check for errors with named-checkconf and look at your logs in var/log/* (depends on distro). Additionally, look at /etc/syslog.conf for logging options.

share|improve this answer
named-checkconf returns no errors and /var/log/* doesn't have anything distinguishable. My distro is Lion and /etc/syslog.conf doesn't contain any reference to named should I add a directive to log named there? – Ryan Schumacher Jul 12 '12 at 20:09

You can use the following terminal command to restart Apache.

sudo apachectl restart

NOTE: You'll need to enter the admin password.

share|improve this answer
Sorry my question may have been a little confusing. I am not asking how to restart Apache (I already do this, frequently) rather I am asking how do I fix the issue: "Apache looses ability to pick up local zone; requires restart" – Ryan Schumacher Jul 11 '12 at 11:07
Ah. I'm afraid you're way out of my league now. :) I've only just mastered setting up vhosts. – DaveAtDog Jul 11 '12 at 11:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.