The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Configuring logs properly to discover why links are refused

Discussion in 'EasyApache' started by dplmartin, Mar 7, 2013.

  1. dplmartin

    dplmartin Registered

    Joined:
    Feb 26, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    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?

    Thanks.
     
  2. cPanelKurtN

    cPanelKurtN Well-Known Member
    Staff Member

    Joined:
    Jan 29, 2013
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi dplmartin,

    What version of Apache are you using?
     
    #2 cPanelKurtN, Mar 7, 2013
    Last edited: Mar 7, 2013
  3. dplmartin

    dplmartin Registered

    Joined:
    Feb 26, 2013
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  4. cPanelKurtN

    cPanelKurtN Well-Known Member
    Staff Member

    Joined:
    Jan 29, 2013
    Messages:
    95
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    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.
     
    #4 cPanelKurtN, Mar 7, 2013
    Last edited: Mar 7, 2013
Loading...

Share This Page