Unix FAQ

Web server (Apache & HTTP) Error Codes with descriptions.
Last updated 9 October 2003: Provide some texts for previously undocumented codes.


Unix FAQ Menu
Contents
Basic commands
Cron
Creating CDs
Device Files
DHCP server (Solaris)
Filesystem explained
Fsck
grub/lilo vanished!
Linux applications?
Linux databases?
Linux distributions
Serial Console
Solaris devices
Solaris disks - Intro
Solaris disks - Adding
Solaris x86 install
SQL/Shell script
Syslog/Monitoring
Time Synchronisation.
Virtual Memory
Web Multi-Language
Web Server Errors
Humour
Unix a Prank



 

This document lists HTTP error codes - those in the range 400-510. According the HTTP standard errors 4xx are client errors, with 5xx being server ones. Note that HTTP codes in the range 100-399 are not errors but status codes.

This is a condensing of web server (httpd) errors from a variety of sources. Much of this text is derived from descriptions in the Apache version 2 source code, texts contributed by Lars Eilebrecht. Occasionally texts have been taken from RFC2616. Many have been supplemented by yours trully (marked ARG:)

For more details see the Apache source - specifically ./docs/error/*.var and ./modules/http/http_protocol.c.

Note: The definitive reference for HTTP response codes should be taken as that defined within RFC2616 - Section 10

400 BAD REQUEST Your browser (or proxy) sent a request that this server could not understand.
401 UNAUTHORIZED This server could not verify that you are authorized to access the specified URL. You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
402 PAYMENT REQUIRED ARG: Not generated by Apache 2.0.43. RFC2616 merely marks this as 'for future use'
403 FORBIDDEN The server understood the request, but is refusing to fulfill it.
For a URL ending with '/':
You don't have permission to access the requested directory. There is either no index document, the directory is read-protected, or directory indexes are forbidden.
Otherwise: You don't have permission to access the requested object. It is either read-protected or not readable by the server.
404 NOT FOUND The specified URL was not found on this server.
ARG: This error may also be encountered if the server actaully had a 403 (Forbidden) but has been configured not to reveal it.
405 METHOD NOT ALLOWED The specified Redirect Request method is not allowed for the requested URL.
406 NOT ACCEPTABLE No acceptable representation was found for the requested resource.
ARG: Usually this means that the browser has been configured to accept only language variants that are not available on the server. Users encountering this error should either remove all language settings to get the server default, or add one that is - E.g: English, code en. More Information.
Webmasters see Apache, multi language support.
407 PROXY AUTH REQUIRED A Proxy server required authentification.
408 REQUEST TIME OUT The server closed the network connection because the browser didn't finish the request within the specified time.
409 CONFLICT Error generated by DAV module - Distributed Authoring & Versioning
410 GONE The requested URL is no longer available on this server and there is no forwarding address.
411 LENGTH REQUIRED A request with the Redirect Request method requires a valid Content-Length header.
412 PRECONDITION FAILED The precondition on the request for the URL failed positive evaluation.
413 REQUEST ENTITY TOO LARGE The Redirect Request method does not allow the data transmitted, or the data volume exceeds the capacity limit.
414 REQUEST URI TOO LARGE The length of the requested URL exceeds the capacity limit for this server. The request cannot be processed.
ARG Security alert - from rfc2616;
... or when the server is under attack by a client attempting to exploit security holes present in some servers using fixed-length buffers for reading or manipulating the Request-URI
415 UNSUPPORTED_MEDIA_TYPE The server does not support the media type transmitted in the request.
416 REQUEST RANGE NOT SATISFIABLE None of the range-specifier values in the Range request-header field overlap the current extent of the selected resource
ARG: Core Apache 2.0.43 never raises this condition.
417 EXPECTATION FAILED The expectation given in the Expect request-header field could not be met by this server.
ARG: Apache only handles the the 100-continue Expect header, anything else will cause this response.
Developers comments from ./server/protocol.c (v.2.0.43);
The Expect header field was added to HTTP/1.1 after RFC 2068 as a means to signal when a 100 response is desired and, unfortunately, to signal a poor man's mandatory extension that the server must understand or return 417 Expectation Failed.  
418-421 Unused  
422 UNPROCESSABLE ENTITY The server understands the media type of the request entity, but was unable to process the contained instructions.
ARG: Core Apache 2.0.43 never raises this condition.
423 LOCKED The requested resource is currently locked. The lock must be released or proper identification given before the method can be applied.
ARG: This error is generated by the DAV module;
This resource is locked and the "If:" header did not specify one of the "locktokens for this resource's lock(s).
424 FAILED DEPENDENCY The method could not be performed on the resource because the requested action depended on another action and that other action failed.
ARG: This error is generated by the DAV module;
Attempted DAV:set operation could not be completed due to other errors.
500 INTERNAL SERVER ERROR The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.
501 NOT IMPLEMENTED

The server does not support the functionality required to fulfill the request.
ARG:
This error is raised in a in Core Apache 2.0.43 when an unknown Transfer-Encoding is specified, and in the proxy_ftp module when either;

  • method is not GET, or
  • an attempt is made to connect to an IPV6 ftp server using EPRT - use EPSV instead.
This error is also generated by the DAV module.
502 BAD GATEWAY The proxy server received an invalid response from an upstream server.
503 SERVICE UNAVAILABLE The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
504 GATEWAY TIMEOUT The proxy server did not receive a timely response from the upstream server.
505 VERSION NOT SUPPORTED The version of http specified is not supported
506 VARIANT ALSO VARIES A variant for the requested entity is itself a negotiable resource. Access not possible.
ARG: Generated by the mod_negotiation module; The transparent multiviews algorithm selected a resource that is itself subject to variant negiotiation.
Text taken from ./modules/mappers/mod_negotiation.c;
This catches the error that a transparent type map selects a transparent multiviews resource as the best variant.

XXX: We do not signal an error if a transparent type map selects a _non_transparent multiviews resource as the best variant, because we can generate a legal negotiation response in this case. In this case, the vlist_validator of the nontransparent subrequest will be lost however. This could lead to cases in which a change in the set of variants or the negotiation algorithm of the nontransparent resource is never propagated up to a HTTP/1.1 cache which interprets Vary. To be completely on the safe side we should return HTTP_VARIANT_ALSO_VARIES for this type of recursive negotiation too.
507 INSUFFICIENT STORAGE The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request. There is insufficient free space left in your storage allocation.
ARG: This error is generated by the DAV module;
508-509 Unused  
510 NOT EXTENDED A mandatory extension policy in the request is not accepted by the server for this resource
     

References

See also rfc2616-section 10 - response Codes



Home Thai Guide   Great Circle Calculator WorldClock AMS Services Contact us