Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

In cpanel I always have the error log open ("This function will display the last 300 errors for your site.") which is nice for 404's but what about the rest?

I'm working on a few things in htaccess, such as this:

RedirectMatch 403 /(\$|\*)/?$

So now when I try any URL with a dollar-sign or an asterisk in it, bam, 403 forbidden; perfect.

So I refresh cpanel's error log page, and nothing. It seems to only care about 404's.

Incidentally, httpd.conf, which I cannot alter, is setup this way:

CustomLog "logs/access_log" common

The errors I'd like to know how to monitor are: 400, 401, 403, and 500.

share|improve this question
    
Can you look at the log file another way? For example, can you download it or FTP it to your local computer? I do not think at this point your logging is in error. I would be downloading the raw access and error log files and checking them. I cannot yet imagine a hosting scenario where your errors appear in the common Apache logs and not the site logs. I am not familiar with CPanel and how it may set things up. –  closetnoc Feb 17 '14 at 3:03
    
You can monitor all these in Google Webmaster Tools or are you wanting something server-side in real time? –  zigojacko Feb 17 '14 at 10:29

1 Answer 1

The Apache error log does track errors other than 404 errors. In the case of 500 errors, it shows you any error output from your scripts. cPanel must be hiding this information from you.

I usually filter the access logs to see a single line for each error page that occurs. I tend to use the command line to tail and filter it like this:

tail -F /var/log/apache2/access_log | grep -E '" (404|403|500) '
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.