1# The configuration below implements multi-language error documents through 2# content-negotiation. 3 4# Customizable error responses come in three flavors: 5# 1) plain text 2) local redirects 3) external redirects 6# Some examples: 7#ErrorDocument 500 "The server made a boo boo." 8#ErrorDocument 404 /missing.html 9#ErrorDocument 404 "/cgi-bin/missing_handler.pl" 10#ErrorDocument 402 http://www.example.com/subscription_info.html 11 12# Required modules: mod_alias, mod_include, mod_negotiation 13# We use Alias to redirect any /error/HTTP_<error>.html.var response to 14# our collection of by-error message multi-language collections. We use 15# includes to substitute the appropriate text. 16# You can modify the messages' appearance without changing any of the 17# default HTTP_<error>.html.var files by adding the line: 18# Alias /error/include/ "/your/include/path/" 19# which allows you to create your own set of files by starting with the 20# /var/www/localhost/error/include/ files and copying them to /your/include/path/, 21# even on a per-VirtualHost basis. The default include files will display 22# your Apache version number and your ServerAdmin email address regardless 23# of the setting of ServerSignature. 24 25<IfDefine ERRORDOCS> 26Alias /error/ "/usr/share/apache2/error/" 27 28<Directory "/usr/share/apache2/error"> 29 AllowOverride None 30 Options IncludesNoExec 31 AddOutputFilter Includes html 32 AddHandler type-map var 33 Require all granted 34 LanguagePriority en cs de es fr it ja ko nl pl pt-br ro sv tr 35 ForceLanguagePriority Prefer Fallback 36</Directory> 37 38ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var 39ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var 40ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var 41ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var 42ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var 43ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var 44ErrorDocument 410 /error/HTTP_GONE.html.var 45ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var 46ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var 47ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var 48ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var 49ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var 50ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var 51ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var 52ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var 53ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var 54ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var 55</IfDefine> 56 57# vim: ts=4 filetype=apache 58