2 # Customizable error responses come in three flavors:
3 # 1) plain text 2) local redirects 3) external redirects
6 #ErrorDocument 500 "The server made a boo boo."
7 #ErrorDocument 404 /missing.html
8 #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
9 #ErrorDocument 402 http://www.example.com/subscription_info.html
13 # Putting this all together, we can internationalize error responses.
15 # We use Alias to redirect any /error/HTTP_<error>.html.var response to
16 # our collection of by-error message multi-language collections. We use
17 # includes to substitute the appropriate text.
19 # You can modify the messages' appearance without changing any of the
20 # default HTTP_<error>.html.var files by adding the line:
22 # Alias /error/include/ "/your/include/path/"
24 # which allows you to create your own set of files by starting with the
25 # /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
26 # even on a per-VirtualHost basis. If you include the Alias in the global server
27 # context, is has to come _before_ the 'Alias /error/ ...' line.
29 # The default include files will display your Apache version number and your
30 # ServerAdmin email address regardless of the setting of ServerSignature.
32 # The internationalized error documents require mod_alias, mod_include
33 # and mod_negotiation. To activate them, uncomment the following 30 lines.
35 <IfModule mod_negotiation.c>
36 <IfModule mod_include.c>
37 <IfModule mod_alias.c>
39 Alias /error/ "/usr/share/apache2/error/"
41 <Directory "/usr/share/apache2/error">
43 Options IncludesNoExec
44 AddOutputFilter Includes html
45 AddHandler type-map var
48 LanguagePriority en cs de es fr it nl sv pt-br ro
49 ForceLanguagePriority Prefer Fallback
52 ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
53 ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
54 ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
55 ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
56 ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
57 ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
58 ErrorDocument 410 /error/HTTP_GONE.html.var
59 ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
60 ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
61 ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
62 ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
63 ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
64 ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
65 ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
66 ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
67 ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
68 ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var