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.

Analog & Webalizer Not Generating - "406 Not Acceptable"

Discussion in 'General Discussion' started by circlec, Feb 22, 2005.

  1. circlec

    circlec Active Member

    Joined:
    Jun 15, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cape Town, South Africa
    Hi,

    When a client of mine trys to view his web stats with either Analog or Webalizer, he gets the following error on the browser:

    ---
    Not Acceptable
    An appropriate representation of the requested resource /tmp/<removed>/analog/2.html could not be found on this server.

    Apache/1.3.33 Server at <removed> Port 80
    ---

    The only webstats that work is Awstats. All the stats programs are selected in the "Tweak Settings" section of WHM and I have just tried a manual /scripts/runweblogs username and neither has fixed these two web stats.

    Your reply will be greatly appreciated.
     
  2. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
    Hi,
    A 406 error is generated by mod_security.
    Check in WHM mod_sec section at the bottom of left the hand frame.
    You should see the error generated and the reason in the log file that is presented.
    This log file can also be found here /usr/local/apache/logs/audit.log
    Sorry, I can't be of much more assistance as I am not familiar with this actual error you have.
    You can test it by removing mod_security. Then try and access your stats. If this is possible, then it confirms it is the mod_sec at fault. It is then a case of trial and error to find the culprit rule and editing it to fix this issue. Don't forget to re-install mod_security and put the defaults back in place.
    There seems to have been some issues with updates that have affected the rules. I just spent all day hunting down a 406 that related to a php script having a rule inspired error that was fixed when I removed an illegal character from the URL. This just appeared out of the blue.
    Good luck.
     
  3. circlec

    circlec Active Member

    Joined:
    Jun 15, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Cape Town, South Africa
    Thank you for the reply however, what does 'mod_security' do exactly and would it harm anything then if i remove it?
     
  4. gorilla

    gorilla Well-Known Member

    Joined:
    Feb 3, 2004
    Messages:
    699
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney / Australia
    personally, I would leave mod_security , you just need to fix the rules you added, maybe just run the default at the moment until you find the right rules to add ;)
     
  5. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    To find the url or POST that is setting the 406 error off, look for the domain name in

    /usr/local/apache/logs/audit_log

    That should tell you which rule to adjust in /usr/local/apache/conf/modsec.user.conf (assuming yours is there.)

    Restart apache after making the changes to the modsec.user.conf file - I think you can use whm to edit rules too if you installed it that way - I haven't done that so can't comment on that bit.
     
  6. Izzee

    Izzee Well-Known Member

    Joined:
    Feb 6, 2004
    Messages:
    469
    Likes Received:
    0
    Trophy Points:
    16
Loading...

Share This Page