Take the 2-minute tour ×

I commented out a VirtualHost configuration in Apache. After reloading/restarting Apache, I can still access the site. Does Apache cache the VirtualHost configurations?

share|improve this question
add comment

1 Answer

No, it does not cache - but it'll always map a request to a <VirtualHost>.

Check the output of apache2ctl -S - it will tell you what's configured and what the defaults are. If you're certain that you're getting content from the disabled vhost (and not the default on that port, instead), then the service didn't restart correctly.

share|improve this answer
The site is not showing up when running apache2ctl. I even tried accessing the site form a computer that has never accessed the site (so it's not a caching issue, I don't think). –  Josh Feb 16 '12 at 20:19
Anything else I can check. I must be totally missing something. I feel like I've commented out a vhost a million times and never seen this. I also commented out 5 other sites and they are still accessible as well. I've restarted/reloaded multiple times. –  Josh Feb 16 '12 at 20:21
Completely stop Apache, and then use ps to double check that it is actually stopped? Perhaps the restart script is broken? –  Zoredache Feb 16 '12 at 20:33
add comment

Your Answer


