1

Is there a way to make Apache2 skip configuration files or segments if they lead to errors?

For example, if I have specified a <VirtualHost></> but the defined path doesn't exist anymore. Is there something that makes Apache skip the web on restart/reload?

2

No, you can't make apache ignore syntax errors, but you can check for errors in advance (httpd -t) or use "graceful restart" (httpd -k graceful) during which the check is done, and if there are some, the config doesn't get reloaded.

1

Usually I'm not very fond of very short answers, but in this case I'll make an exception: No, you cannot. If the config is not valid, Apache will tell you.

If a DocumentRoot does not exist that will not lead to an error, just a warning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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