How do I investigate 500 Error Messages?

Linode Staff

I received a 500 error message for my website and I'm not sure why. Rebooting my server helped to resolve things. How can I investigate the cause of this error?

1 Reply

I would start with reviewing the error log file for your web service. Depending on which web service you are using and how the service is configured, the error log may reside under one of these directories:

cat /var/log/apache2/error.log
cat /var/log/nginx/error.log
cat /var/log/httpd/error_log

I also recommend reviewing the system log files for additional insight. Some of the files that you can check are under the /var/log directory.

cat /var/log/messages
cat /var/log/syslog
cat /var/log/kern.log
https://www.eurovps.com/blog/important-linux-log-files-you-must-be-monitoring/

I also recommend checking to see if your server is running into a disk space or memory issue.

df -h
df -i
free -m

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct