Monday, April 27, 2015

Apache mod_status page mangled by mod_rewrite?

Quicktip: if a complicated mod_rewrite setup is making your /server-status inaccessible, just paste the following two lines above all the rewrite rules:

RewriteCond %{REQUEST_URI} /server-status
RewriteRule .* - [L]

and you're ready to set up monitoring of Apache processes.
If the rules are in /etc/apache2, not in .htaccess, you need to reload the web server too:

/etc/init.d/apache2 reload

You know you shouldn't use .htaccess anyway because it hurts performance, right?

No comments:

Post a Comment