PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/conf-enabled/localized-error-pages.conf

https://github.com/rauldelperal/bdk-web-apache2
Config | 81 lines | 78 code | 3 blank | 0 comment | 0 complexity | cfd0ae5e448102514efe8b97181d19c9 MD5 | raw file
  1. # Customizable error responses come in three flavors:
  2. # 1) plain text
  3. # 2) local redirects
  4. # 3) external redirects
  5. #
  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. #
  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. #<IfModule mod_negotiation.c>
  43. # <IfModule mod_include.c>
  44. # <IfModule mod_alias.c>
  45. #
  46. # Alias /error/ "/usr/share/apache2/error/"
  47. #
  48. # <Directory "/usr/share/apache2/error">
  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>
  78. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet