Search code examples
apache.htaccessapache-config

How do I find out an effective apache config setting in a directory


Suppose you want to find out about a specific apache config setting/directive, say LimitRequestBody in a certain directory path/to/somewhere.

You don't know and don't where the actual file responsible for the setting in effect is - it might be the main apache config, or any .htaccess on the way down (path/.htaccess, path/to/.htaccess or path/to/somewhere/.htaccess).

Is there a convenient way to find out, which actual setting is in effect in path/to/somewhere (optionally which file the setting originated from)?


Solution

  • If you stick to not using .htaccess, you can get a decent amount of information from using mod_info. If you use .htaccess files, there is currently no module that will tell you "what/who caused this", simply because it's very very difficult to figure out due to how rules are put in place internally.

    I am, as a hobby project, working on having mod_lua (which is a core part of the 2.4 distribution) be able to tell you this in the near future, but right now, the simple answer is: You can't.