PageRenderTime 13ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/apache2/conf.d/localized-error-pages

http://github.com/brinkman83/bashrc
#! | 79 lines | 77 code | 2 blank | 0 comment | 0 complexity | 844ba27ddb794fc6967bfb56b950e6a8 MD5 | raw file
 1#
 2# Customizable error responses come in three flavors:
 3# 1) plain text 2) local redirects 3) external redirects
 4#
 5# Some examples:
 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
10#
11
12#
13# Putting this all together, we can internationalize error responses.
14#
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.
18#
19# You can modify the messages' appearance without changing any of the
20# default HTTP_<error>.html.var files by adding the line:
21#
22#   Alias /error/include/ "/your/include/path/"
23#
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.
28#
29# The default include files will display your Apache version number and your
30# ServerAdmin email address regardless of the setting of ServerSignature.
31#
32# WARNING: The configuration below will NOT work out of the box if you have a
33#          SetHandler directive in a <Location /> context somewhere. Adding
34#          the following three lines AFTER the <Location /> context should
35#          make it work in most cases:
36#          <Location /error/>
37#             SetHandler none
38#          </Location>
39#
40# The internationalized error documents require mod_alias, mod_include
41# and mod_negotiation.  To activate them, uncomment the following 37 lines.
42
43#<IfModule mod_negotiation.c>
44# <IfModule mod_include.c>
45#  <IfModule mod_alias.c>
46#
47#    Alias /error/ "/usr/share/apache2/error/"
48#
49#    <Directory "/usr/share/apache2/error">
50#        AllowOverride None
51#        Options IncludesNoExec
52#        AddOutputFilter Includes html
53#        AddHandler type-map var
54#        Order allow,deny
55#        Allow from all
56#        LanguagePriority en cs de es fr it nl sv pt-br ro
57#        ForceLanguagePriority Prefer Fallback
58#    </Directory>
59#
60#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
61#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
62#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
63#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
64#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
65#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
66#    ErrorDocument 410 /error/HTTP_GONE.html.var
67#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
68#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
69#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
70#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
71#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
72#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
73#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
74#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
75#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
76#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
77#  </IfModule>
78# </IfModule>
79#</IfModule>