InMotion Hosting Support Center

How may I access the Apache Server Error Log?

Category: How To

chankins
Asked:
2014-03-13 4:29 pm EST

Hits: 4,549
How may I access the Apache Server Error Log? Can I access it via cPanel or WHM? Or do I need putty or something like that?

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

1

JacobIMH
Staff
9,968 Points
2014-03-13 5:13 pm EST
Hello chankins, and thanks for your question.

You can access the Apache error log at the following location on a VPS or dedicated server:

/usr/local/apache/logs/error_log


You would need to connect to the server via SSH using an SSH agent like PuTTY. I personally like PuTTYtray which offers a few more enhancements.

Some good ways to navigate through the Apache error log would be watching it live:

tail -f /usr/local/apache/logs/error_log


Then you can hit Ctrl-C in PuTTY to stop watching the log. You could also specifically look for entries from your IP address. For instance if your IP was 123.123.123.123 you could use this:

grep "123.123.123.123" /usr/local/apache/logs/error_log | less


If you wanted to see the IP addresses that are causing the most Apache errors, you could run this:

awk '{print $8}' /usr/local/apache/logs/error_log | sort -n | uniq -c | sort -n


If you had any other questions at all, please let us know!

- Jacob

You must login before you can post a comment about this answer.

Like this Question?

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

   
Social Login Joomla

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!