Description: Cherokee is a flexible, very fast, lightweight Web server. It is implemented entirely in C, and has no dependencies beyond a standard C library. It is embeddable and extensible with plug-ins. It supports on-the-fly configuration by reading files or strings, TLS/SSL (via GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly features, PHP, custom error management, and much more.
Keywords: cherokee web server httpd http

## Index → Modules → Handlers

## Handler: HTTP Error

The HTTP Error (``custom_error`` internally) handler is used to generate errors when certain rules are matched. For instance it can be used to deny access to specific files, such as those containing passwords.

### Parameters

Parameters | Type | Description
--- | --- | ---
`error` | number | HTTP error code return.

Available errors in `cherokee-admin`
Code | Description
--- | ---
400 | Bad Request
401 | Unauthorized
402 | Payment Required
403 | Forbidden
404 | Not Found
405 | Method Not Allowed
406 | Not Acceptable
407 | Proxy Auth Required
408 | Request Timeout
409 | Conflict
410 | Gone
411 | Length Required
412 | Precondition Failed
413 | Request Entity too large
414 | Request-URI too long
415 | Unsupported Media Type
416 | Requested range not satisfiable
417 | Expectation Failed
422 | Unprocessable Entity
423 | Locked
424 | Failed Dependency
425 | Unordered Collection
426 | Upgrade Required
449 | Retry With
500 | Internal Server Error
501 | Not Implemented
502 | Bad gateway
503 | Service Unavailable
504 | Gateway Timeout
505 | HTTP Version Not Supported
506 | Variant Also Negotiates
507 | Insufficient Storage
509 | Bandwidth Limit Exceeded
510 | Not Extended