Apache configuration file visualization/testing

Posted by Matt Holgate on Server Fault See other posts from Server Fault or by Matt Holgate
Published on 2013-07-02T09:57:52Z Indexed on 2013/07/02 11:07 UTC
Read the original article Hit count: 206

Filed under:
|

Is there a tool available (or a debug mode built into Apache) that will allow me to interactively test and explain an Apache configuration for a given request?

In particular, I'd like to be able to see which directives will apply when requesting a specific URL.

For example, the output for the URL http://myserver.com/foo/bar/bar.html might look something like:

Allow from 192.168.0.3  <-- From <Location /foo/bar> in myserver.com vhost
Require valid user      <-- From <Directory /var/www/foo> in global configuration
Satisfy any             <-- From <File bar.html> in global configuration

[Background: why do I want this? The apache merging rules for configuration directives are quite complex to get right. It would be great to have a tool which allows you to check that your rules are doing exactly what you want, and would be a good learning tool].

If there isn't such a tool, is there a debug option in Apache that will log such information for each incoming request?

© Server Fault or respective owner

Related posts about apache2

Related posts about configuration