apache2.conf 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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/