apache2.conf 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # It is split into several files forming the configuration hierarchy outlined
  2. # below, all located in the /etc/apache2/ directory:
  3. #
  4. # /etc/apache2/
  5. # |-- apache2.conf
  6. # | `-- ports.conf
  7. # |-- mods-enabled
  8. # | |-- *.load
  9. # | `-- *.conf
  10. # |-- conf.d
  11. # | `-- *
  12. # Global configuration
  13. PidFile ${APACHE_PID_FILE}
  14. Timeout 30
  15. KeepAlive Off
  16. MaxKeepAliveRequests 100
  17. KeepAliveTimeout 10
  18. <IfModule mpm_prefork_module>
  19. StartServers 8
  20. MinSpareServers 5
  21. MaxSpareServers 20
  22. ServerLimit 256
  23. MaxClients 200
  24. MaxRequestsPerChild 4000
  25. </IfModule>
  26. <IfModule mpm_worker_module>
  27. StartServers 2
  28. MinSpareThreads 25
  29. MaxSpareThreads 75
  30. ThreadLimit 64
  31. ThreadsPerChild 25
  32. MaxClients 200
  33. MaxRequestsPerChild 4000
  34. </IfModule>
  35. <IfModule mpm_event_module>
  36. StartServers 2
  37. MinSpareThreads 25
  38. MaxSpareThreads 75
  39. ThreadLimit 64
  40. ThreadsPerChild 25
  41. MaxClients 200
  42. MaxRequestsPerChild 4000
  43. </IfModule>
  44. # These need to be set in /etc/apache2/envvars
  45. User ${APACHE_RUN_USER}
  46. Group ${APACHE_RUN_GROUP}
  47. #User www-data
  48. #Group www-data
  49. AccessFileName .htaccess
  50. <Files ~ "^\.ht">
  51. Order allow,deny
  52. Deny from all
  53. Satisfy all
  54. </Files>
  55. DefaultType None
  56. HostnameLookups Off
  57. ErrorLog ${APACHE_LOG_DIR}/error.log
  58. LogLevel warn
  59. # Include module configuration:
  60. Include mods-enabled/*.load
  61. Include mods-enabled/*.conf
  62. # Include list of ports to listen on and which to use for name based vhosts
  63. Include ports.conf
  64. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  65. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  66. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  67. LogFormat "%{Referer}i -> %U" referer
  68. LogFormat "%{User-agent}i" agent
  69. LogFormat "%b" bytes
  70. Include conf.d/
  71. # Include the virtual host configurations:
  72. #Include sites-enabled/
  73. ErrorDocument 403 /error/403.html
  74. ErrorDocument 404 /error/404.html
  75. ErrorDocument 500 /error/50x.html
  76. ErrorDocument 501 /error/50x.html
  77. ErrorDocument 502 /error/50x.html
  78. ErrorDocument 503 /error/50x.html
  79. ErrorDocument 506 /error/50x.html