willeM_ Van Onsem
willeM_ Van Onsem

Reputation: 477210

Retrieve Apache configuration at directory

Is there some command to retrieve the Apache settings applicable to a certain directory in other words the command should take into account the cascade of .htaccess files as well as the global configuration of the Apache server.

The command should do something like:

$ command .
AddType text/html html
...

Such command can be useful to debug why a certain page generates a 500 (or other) error. Since several configuration files can play their part in this.

Upvotes: 3

Views: 78

Answers (1)

arober11
arober11

Reputation: 2019

Short answer NO, but you can see what rewrite rules are being applied to requests, that's assuming you have access to the servers httpd.conf and the ability to restart the web server. Simply add the following to your virtual host definition / included rewrite file e.g.

RewriteLog "/tmp/tmp_rewrite.log" 
RewriteLogLevel 9

Remember to remove / comment out the entry, or to set the RewriteLogLevel to 0 once you've finished playing.

Upvotes: 2

Related Questions