apache2.conf 2.2 KB

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