Get Apache configuration in directory

Is there any command to get Apache settings applicable to a specific directory, in other words, the command should take into account the cascade of files .htaccess

as well as the global configuration of the Apache server.

The command should do something like:

$ command .
AddType text/html html


This command

can be useful for debugging why a 500 (or other) error is generated on a certain page . As multiple config files can play a role in this.


source to share

1 answer

The short answer is NO, but you can see what rewrite rules apply to requests, provided you have access to the httpd.conf servers and the ability to restart the web server. Just add the following to your virtual host file definition / include file eg.

RewriteLog "/tmp/tmp_rewrite.log" 
RewriteLogLevel 9


Remember to delete / comment out the entry or set the RewriteLogLevel to 0 after you've finished playing.



All Articles