Configuring logs properly to discover why links are refused


Feb 26, 2013
cPanel Access Level
Root Administrator

I'm trying to setup a WHM/CPanel server with our sites. They run on Joomla, so there are a number of mod_rewrite rules to combat security vulnerabilities that have (historically) been applied to the .htaccess files and we'd like to move into httpd.conf.

We're getting a number of 403 Forbidden or 404 Not Found errors as we move from the old host environment to the new. We've proved that some of these are as a result of a URL mod_rewrite (by removing the entire .htaccess to see if things work). PHP can be making these requests behind the scenes, so you don't always know what's been requested.

Has anyone got a suggested Easyapache configuration that will get apache to generate a detailed enough log that will tell us which mod_rewrite rule or other security directive is responsible for blocking the request being made so that we can pinpoint a solution much faster?



Well-Known Member
Jan 29, 2013
cPanel Access Level
Root Administrator
Thanks for responding. We're using WHM 11.34.1 (build 12). EasyApache v3.18.6. Apache 2.2.24
To answer your earlier question, there isn't an EasyApache configuration that can help you diagnose your rewrite rules in Apache.

However, you can manually modify Apache by using the RewriteLog and RewriteLogLevel directives.

For more information, please read Apache's mod_rewrite documentation for Apache 2.2.

Few Pointers:
  • If you intend on making your rules permanent, it would be a good idea, if possible, to place these in their own include file, as opposed to making one or more custom templates.
  • It's probably best to use these directives within a single virtual host, as opposed to being global. The penalty for logging this information can be quite high.
Last edited: