In an earlier post, I went over some of the common error codes for Apache web servers. Most of them, like “404 Not Found”, are pretty easy to troubleshoot; however, one of the more obscure errors is “500 Internal Server Error”. It is clear from the error that something running on the server side has failed. What is not clear is exactly what failed.
If possible, the first thing to do when troubleshooting an internal server error is to remember what you were doing when it started. If someone else caused the error on your dedicated server, try to gather as much information from that person as possible.
Errors like this one are typically the result of incorrectly installed scripts (PHP, Perl, etc.) or restrictive permissions on the scripts. Here are a few specific possibilities you can check:
1. Make sure the scripts are installed in the right location. CGI scripts, in particular, often need to be located in executable directories.
2. Check the upload method used. If the person who uploaded the scripts used a binary FTP upload when it should have been ASCII, the files could be corrupted.
3. Make sure the file permissions for the script are set correctly.
4. Ensure that the script was not modified in a way that would cause it to malfunction. This is particularly likely if you are writing your own untested web application. It may take a certain unique form of HTTP request to trigger the error.
5. Check the server logs, particularly Apache’s error logs.
6. Turn on any debugging features in the script or software. It may tell you the exact error.
7. Try running the script from the command line to see if it produces a more detailed error message.
There is no particular right answer to the dreaded Internal Server Error, but with a little investigating and a lot of patience, you should be able to find the cause and then come up with a reasonable solution.