How to make Apache skip directory search on restart?

I'm running Ubuntu 12.04 LTS and whenever I restart Apache, if it can't find a site folder, all of my websites don't come up.

Example: sometimes I have a test site and remove the folders, but forget to issue a a2dissite command for that URL. Then, the next time I issue a "service apache2 reload" or "service apache2 restart" none of the other sites load. A check of the logs indicates Apache can't locate the "logs" folder in the test site I deleted.

So, is there any way to force Apache to start up regardless of whether it can find a site's folders?


4 Replies

So you'd rather config some work around in Apache so that it doesn't provide the normal safety net of checking that everything is in place like it should be, instead of just remembering to do system maintenance like you should?

Seems like the "cure" is more time consuming then the "disease".

BTW, that's why you don't dev (or test) on a production box.


You could try apachectl configtest before restart

Or make a logs dir outsite of the webroot

You might want to consider running an apache instance on a weird port and use ProxyPass and ProxyPassReverse in your main apache config to point the domain or URL under test to the test instance port. This also facilitates A/B testing.

Edit: This scenario would let the main apache instance start even when the test instance isn't running.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct