H
10Corp Premium Hosting

Understanding Server Logs

Last Updated: March 2026 2 min read

Understanding Server Logs

Server logs are invaluable for troubleshooting website issues, monitoring traffic, and identifying security threats. Your hosting account generates two main types of logs: access logs and error logs.

Types of Server Logs

Access Logs

Access logs record every request made to your website, including:

  • Visitor IP address
  • Date and time of the request
  • HTTP method and URL requested
  • HTTP status code returned
  • User agent (browser/bot identification)
  • Referring URL

Example access log entry:

192.168.1.1 - - [07/Mar/2026:10:15:30 -0500] "GET /index.html HTTP/1.1" 200 5432 "https://google.com" "Mozilla/5.0..."

Error Logs

Error logs record server-side errors, including:

  • PHP errors (fatal, warning, notice)
  • File permission issues
  • Missing files (404 errors)
  • Configuration problems
  • Application crashes

Example error log entry:

[Fri Mar 07 10:15:30.123456 2026] [php:error] [pid 12345] [client 192.168.1.1:54321] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

Accessing Logs in cPanel

Error Log (Quick View):

  1. Log into cPanel.
  2. Go to Metrics > Errors.
  3. View the most recent 300 error entries.

Raw Access Logs:

  1. Go to Metrics > Raw Access.
  2. Download compressed log files for each domain.

Error Log File:

  • Location: /home/username/logs/error.log or check public_html/error_log
  • Access via File Manager or SSH

Access Log File:

  • Location: /home/username/logs/access.log (or similar path)
  • Access via File Manager or SSH

Reading Log Entries

Common HTTP Status Codes in Logs:

CodeMeaningAction
200OK — SuccessfulNormal, no action needed
301Moved PermanentlyCheck redirects are working
304Not ModifiedNormal — browser caching working
403ForbiddenCheck file permissions
404Not FoundFix broken links or missing files
500Internal Server ErrorCheck error log for details
503Service UnavailableServer overloaded or maintenance

Using Logs for Troubleshooting

Finding PHP errors:

grep "PHP" /home/username/logs/error.log | tail -20

Finding 404 errors:

grep " 404 " /home/username/logs/access.log | tail -20

Checking for suspicious activity:

grep "wp-login" /home/username/logs/access.log | awk '{print $1}' | sort | uniq -c | sort -rn | head -10

Monitoring logs in real-time via SSH:

tail -f /home/username/logs/error.log

Log Management Tips

  • Check error logs first when troubleshooting any website issue.
  • Rotate logs regularly to prevent them from consuming excessive disk space.
  • Archive old logs for compliance or analysis purposes.
  • Use log analysis tools like AWStats or Webalizer (available in cPanel under Metrics) for visual reports.
  • Monitor for brute-force attacks by checking repeated failed login attempts.

Privacy Considerations

Server logs contain visitor IP addresses and are subject to privacy regulations like GDPR. Ensure your privacy policy discloses log collection, and consider implementing log anonymization if required.

For help interpreting server logs, contact 10Corp support.

Tags: hosting logs error-log access-log troubleshooting

Still need help?

Our support team is available 24/7 to assist you.