/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. # Putting this all together, we can internationalize error responses.
  13. #
  14. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  15. # our collection of by-error message multi-language collections. We use
  16. # includes to substitute the appropriate text.
  17. #
  18. # You can modify the messages' appearance without changing any of the
  19. # default HTTP_<error>.html.var files by adding the line:
  20. #
  21. # Alias /error/include/ "/your/include/path/"
  22. #
  23. # which allows you to create your own set of files by starting with the
  24. # /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
  25. # even on a per-VirtualHost basis. If you include the Alias in the global server
  26. # context, is has to come _before_ the 'Alias /error/ ...' line.
  27. #
  28. # The default include files will display your Apache version number and your
  29. # ServerAdmin email address regardless of the setting of ServerSignature.
  30. #
  31. # WARNING: The configuration below will NOT work out of the box if you have a
  32. # SetHandler directive in a <Location /> context somewhere. Adding
  33. # the following three lines AFTER the <Location /> context should
  34. # make it work in most cases:
  35. # <Location /error/>
  36. # SetHandler none
  37. # </Location>
  38. #
  39. # The internationalized error documents require mod_alias, mod_include
  40. # and mod_negotiation. To activate them, uncomment the following 37 lines.
  41. #<IfModule mod_negotiation.c>
  42. # <IfModule mod_include.c>
  43. # <IfModule mod_alias.c>
  44. #
  45. # Alias /error/ "/usr/share/apache2/error/"
  46. #
  47. # <Directory "/usr/share/apache2/error">
  48. # AllowOverride None
  49. # Options IncludesNoExec
  50. # AddOutputFilter Includes html
  51. # AddHandler type-map var
  52. # Order allow,deny
  53. # Allow from all
  54. # LanguagePriority en cs de es fr it nl sv pt-br ro
  55. # ForceLanguagePriority Prefer Fallback
  56. # </Directory>
  57. #
  58. # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  59. # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  60. # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  61. # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  62. # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  63. # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  64. # ErrorDocument 410 /error/HTTP_GONE.html.var
  65. # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  66. # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  67. # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  68. # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  69. # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  70. # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  71. # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  72. # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  73. # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  74. # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  75. # </IfModule>
  76. # </IfModule>
  77. #</IfModule>