Apache server response codes
Whenever a user sends a request to a server, a process called a ‘handshake’ begins where the server and your computer communicate and the server makes sure it can accommodate what your user has requested of it. This means being able to make the connection between the two computers and then completing the transfer of data.
Headers are short fragments of text which are generated by servers to hold information pertaining to each transfer as it occurs. There are four kinds of headers:
This holds information about the client (user), the server itself and the protocol being used (like http or ftp).
Entity This holds information about the data that is being transferred.
This holds information about the allowable formats and parameters for the transfer.
This is sent out by the server at the end of a transfer, and includes detailed information, in code form, on the outcome of the transfer.
As a web surfer you’ve probably become familiar with the dreaded 404 error message and the 500 internal server error.
If you get a 404 make sure your link is correct. Case does matter.A 500 Error is the result of a misconfigured CGI script or a misconfigured .htaccess file,. These are the most well-known server response codes, but there are many more. These numerical codes are grouped — the low numbers are generally ‘good’, and operate silently, while anything over 400 is definitely bad news and will be reported to the user in the form of an error message.
Silent Response Codes that signify that a request has been received and is currently being processed.
The request has been completed and the rest of the process can continue.
The user’s request to switch protocols (like from FTP to HTTP) was accepted.
Silent codes that confirm that requests have completed successfully.
Ok — the file which the client requested is available for transfer. This is the response code you want to see all of your users receiving.
When new pages are created by posted form data or by a CGI process, this is confirmation that it worked.
The client’s request was accepted, though not yet processed.
The information contained in the entity header is not from the original site, but from a third party server.
If you click a link which has no target URL, this response is elicited by the server. It’s silent and doesn’t warn the user about anything.
This allows the server to reset any content returned by a CGI.
Partial content — the requested file wasn’t downloaded entirely. This is returned when the user presses the stop button before a page is loaded, for example.
A redirection is occurring from the original request.
The requested address refers to more than one file. Depending on how the server is configured, you get an error or a choice of which page you want.
Moved Permanently — if the server is set up properly it will automatically redirect the reader to the new location of the file.
Found — page has been moved temporarily, and the new URL is available. You should be sent there by the server.
This is a “see other” SRC. Data is somewhere else and the GET method is used to retrieve it.
Not Modified — if the request header includes an ‘if modified since’ parameter, this code will be returned if the file has not changed since that date. Search engine robots may generate a lot of these.
Request is incomplete for some reason.
Bad Request — there is a syntax error in the request, and it is denied.
The request header did not contain the necessary authentication codes, and the client is denied access.
Payment is required. This code is not yet in operation.
Forbidden — the client is not allowed to see a certain file. This is also returned at times when the server doesn’t want any more visitors.
Document not found — the requested file was not found on the server. Possibly because it was deleted, or never existed before. Often caused by misspellings of URLs.
The method you are using to access the file is not allowed.
The requested file exists but cannot be used as the client system doesn’t understand the format the file is configured for.
The request must be authorised before it can take place.
Request Timeout — the server took longer than its allowed time to process the request. Often caused by heavy net traffic.
Too many concurrent requests for a single file.
The file used to be in this position, but is there no longer.
The request is missing its Content-Length header.
A certain configuration is required for this file to be delivered, but the client has not set this up.
The requested file was too big to process.
The address you entered was overly long for the server.
The filetype of the request is unsupported.
Errors have occurred in the server itself.
Internal Server Error — nasty response that is usually caused by a problem in your Perl code when a CGI program is run.
The request cannot be carried out by the server.
Bad Gateway — the server you’re trying to reach is sending back errors.
Temporarily Unavailable — the service or file that is being requested is not currently available.
The gateway has timed out. Like the 408 timeout error, but this one occurs at the gateway of the server.
The HTTP protocol you are asking for is not supported.
Error code categories
Successful Client Requests:
203 Non-Authorative Information
204 No Content
205 Reset Content
206 Partial Content
Client Request Redirected:
300 Multiple Choices
301 Moved Permanently
302 Moved Temporarily
303 See Other
304 Not Modified
305 Use Proxy
Client Request Errors:
400 Bad Request
401 Authorization Required
402 Payment Required (not used yet)
404 Not Found
405 Method Not Allowed
406 Not Acceptable (encoding)
407 Proxy Authentication Required
408 Request Timed Out
409 Conflicting Request
411 Content Length Required
412 Precondition Failed
413 Request Entity Too Long
414 Request URI Too Long
415 Unsupported Media Type
500 Internal Server Error
501 Not Implemented
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
505 HTTP Version Not Supported