Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator webmaster@******.com and inform them of the time the error occurred and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error was encountered while trying to use an ErrorDocument to handle the request.
How is this resolved?
I’m very familiar with this error. I see it all the time when setting up or making changes to websites.
The good news? It’s not your fault.
The bad news? There’s probably nothing you can do.
Become a Patron of Ask Leo! and go ad-free!
- It’s not really your problem, and there’s likely nothing you can do.
- Make sure the URL you’re going to is exactly correct.
- Links in email are sometimes broken by line wrapping.
- Treating it like a browser problem can help.
- If you’re the webmaster, there are probably some clues on your server.
It’s the server’s problem
An internal server error is an error on the web server you’re trying to access. That server is misconfigured in some way that prevents it from responding properly to what you’re asking it to do.
Think of it like the web’s version of a blue screen. 🙂 Something went so wrong on the server that it couldn’t even tell you what the problem was.
Aside from informing the site owner (who may or may not be at the webmaster’s email address included in the error message), there’s probably nothing you can do to resolve this problem. That’s because it’s not your problem.
The person who is responsible for the website needs to fix it.
It’s still the server’s fault, but…
Even though it’s the server’s fault for not handling something properly, there are scenarios where you might have inadvertently caused this. For example, errors in URLs can cause it.
One scenario: you saw a link in an email or webpage, and rather than clicking on it, you copied and pasted the link in a web browser. If you accidentally didn’t select the entire link and left off a few important characters, you might see this message.
Similarly, if you’re typing in a URL from a book or other source, and don’t type it in exactly, you might see this message.
To be clear, the server should be able to handle whatever you did cleanly and report errors in some useful way. If the server doesn’t, and you get an Internal Server Error message, it’s still the server’s fault.
There are some straws to grasp at
An internal server error happens when the server encounters a situation it doesn’t know how to handle. Occasionally, your browser can be the source of these kinds of errors. You can try these steps to see if they’ll help:
- Clear the browser cache
- Clear cookies
- Refresh the page (F5)
- Try a different browser
While it’s more than likely these won’t work, there’s always a chance they might, and they are simple to try.
If you’re the webmaster…
What if you’re the webmaster?
Nine times out of 10, this error results from one of two common errors:
- An error in a CGI script caused it to fail or output an error message before it started producing valid HTML. It happens to me all the time if I have a syntax error in one of my Perl CGI scripts.
- A permissions issue occurred when attempting to access a CGI script. Depending on how your web server is configured, it’s not enough for the script to have “execute” permission; it must also be owned by the correct user and belong to the correct group. I can’t tell you what that should be, because it varies widely from server to server (and even from site to site on the same server). My best recommendation is to look at the attributes of a script that is working and copy that.
The format of the error described here is common for Apache web servers. That means we can also look for common error logs. Once again, the location of these logs varies a great deal based on specific web server configuration.
- access_log is the log of successful accesses. On a shared or virtual hosting server, there may be many of these: one per website, often with site-specific names or in site-specific locations on the server.
- error_log is the log of errors. On some hosts, there is an error log per site. On others, each site has its own access_log, but there may only be a single error_log for the system.
- suexec_log is the log most people forget. It deals with the permissions used to execute CGI and other scripts. When a CGI fails to execute because its ownership is wrong, the generic internal server error shows in the error log, but a more specific error detailing the permissions involved appears in this log.
The message “Additionally, a 500 Internal Server Error was encountered while trying to use an ErrorDocument…” indicates a second configuration error on the server.
When the web server encounters an error of any sort, the page it displays to report the error is just another .html file stored on the server. This error means that trying to display the error page for the first error (the internal server error) actually generated a second error (also an internal server error, in your case).
At that point, the server just gave up.