Advertisement
knut

apache2.conf

Feb 4th, 2012
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1.  
  2. ServerTokens Prod
  3. ServerSignature Off
  4.  
  5. ServerRoot "/etc/apache2"
  6.  
  7. #
  8. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  9. #
  10. #<IfModule !mpm_winnt.c>
  11. #<IfModule !mpm_netware.c>
  12. LockFile /var/lock/apache2/accept.lock
  13. #</IfModule>
  14. #</IfModule>
  15.  
  16. #
  17. # PidFile: The file in which the server should record its process
  18. # identification number when it starts.
  19. # This needs to be set in /etc/apache2/envvars
  20. #
  21. PidFile ${APACHE_PID_FILE}
  22.  
  23. #
  24. # Timeout: The number of seconds before receives and sends time out.
  25. #
  26. Timeout 120
  27.  
  28.  
  29. KeepAlive On
  30.  
  31. MaxKeepAliveRequests 100
  32.  
  33. KeepAliveTimeout 15
  34.  
  35.  
  36. <IfModule mpm_prefork_module>
  37. StartServers 1
  38. MinSpareServers 1
  39. MaxSpareServers 5
  40. MaxClients 40
  41. MaxRequestsPerChild 0
  42. </IfModule>
  43.  
  44.  
  45. <IfModule mpm_worker_module>
  46. StartServers 1
  47. MinSpareThreads 1
  48. MaxSpareThreads 4
  49. ThreadLimit 64
  50. ThreadsPerChild 25
  51. MaxClients 40
  52. MaxRequestsPerChild 0
  53. </IfModule>
  54.  
  55. <IfModule mpm_event_module>
  56. StartServers 1
  57. MaxClients 40
  58. MinSpareThreads 1
  59. MaxSpareThreads 4
  60. ThreadLimit 64
  61. ThreadsPerChild 25
  62. MaxRequestsPerChild 0
  63. </IfModule>
  64.  
  65.  
  66. User ${APACHE_RUN_USER}
  67. Group ${APACHE_RUN_GROUP}
  68.  
  69.  
  70. AccessFileName .htaccess
  71.  
  72.  
  73. <Files ~ "^\.ht">
  74. Order allow,deny
  75. Deny from all
  76. Satisfy all
  77. </Files>
  78.  
  79. DefaultType text/plain
  80.  
  81.  
  82. HostnameLookups Off
  83. ErrorLog /var/log/apache2/error.log
  84.  
  85. LogLevel warn
  86.  
  87.  
  88. Include /etc/apache2/mods-enabled/*.load
  89. Include /etc/apache2/mods-enabled/*.conf
  90.  
  91. # Include all the user configurations:
  92. Include /etc/apache2/httpd.conf
  93.  
  94. # Include ports listing
  95. Include /etc/apache2/ports.conf
  96.  
  97. #
  98. # The following directives define some format nicknames for use with
  99. # a CustomLog directive (see below).
  100. # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
  101. #
  102. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  103. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  104. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  105. LogFormat "%{Referer}i -> %U" referer
  106. LogFormat "%{User-agent}i" agent
  107.  
  108. #
  109. # Define an access log for VirtualHosts that don't define their own logfile
  110. CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined
  111.  
  112.  
  113. # Include of directories ignores editors' and dpkg's backup files,
  114. # see README.Debian for details.
  115.  
  116. # Include generic snippets of statements
  117. Include /etc/apache2/conf.d/
  118.  
  119. # Include the virtual host configurations:
  120. Include /etc/apache2/sites-enabled/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement