Advertisement
Guest User

Untitled

a guest
Jun 19th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.40 KB | None | 0 0
  1. # This is the main Apache server configuration file. It contains the
  2. # configuration directives that give the server its instructions.
  3. # See http://httpd.apache.org/docs/2.2/ for detailed information about
  4. # the directives and /usr/share/doc/apache2-common/README.Debian.gz about
  5. # Debian specific hints.
  6. #
  7. #
  8. # Summary of how the Apache 2 configuration works in Debian:
  9. # The Apache 2 web server configuration in Debian is quite different to
  10. # upstream's suggested way to configure the web server. This is because Debian's
  11. # default Apache2 installation attempts to make adding and removing modules,
  12. # virtual hosts, and extra configuration directives as flexible as possible, in
  13. # order to make automating the changes and administering the server as easy as
  14. # possible.
  15.  
  16. # It is split into several files forming the configuration hierarchy outlined
  17. # below, all located in the /etc/apache2/ directory:
  18. #
  19. # /etc/apache2/
  20. # |-- apache2.conf
  21. # | `-- ports.conf
  22. # |-- mods-enabled
  23. # | |-- *.load
  24. # | `-- *.conf
  25. # |-- conf.d
  26. # | `-- *
  27. # `-- sites-enabled
  28. # `-- *
  29. #
  30. #
  31. # * apache2.conf is the main configuration file (this file). It puts the pieces
  32. # together by including all remaining configuration files when starting up the
  33. # web server.
  34. #
  35. # In order to avoid conflicts with backup files, the Include directive is
  36. # adapted to ignore files that:
  37. # - do not begin with a letter or number
  38. # - contain a character that is neither letter nor number nor _-.
  39. # - contain .dpkg
  40. #
  41. # * ports.conf is always included from the main configuration file. It is
  42. # supposed to determine listening ports for incoming connections, and which
  43. # of these ports are used for name based virtual hosts.
  44. #
  45. # * Configuration files in the mods-enabled/ and sites-enabled/ directories
  46. # contain particular configuration snippets which manage modules or virtual
  47. # host configurations, respectively.
  48. #
  49. # They are activated by symlinking available configuration files from their
  50. # respective *-available/ counterparts. These should be managed by using our
  51. # helpers a2enmod/a2dismod, a2ensite/a2dissite. See
  52. # their respective man pages for detailed information.
  53. #
  54. # * Configuration files in the conf.d directory are either provided by other
  55. # packages or may be added by the local administrator. Local additions
  56. # should start with local- or end with .local or .local.conf to avoid name
  57. # clashes. All files in conf.d are included
  58. #
  59. # * The binary is called apache2. Due to the use of environment variables, in
  60. # the default configuration, apache2 needs to be started/stopped with
  61. # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
  62. # work with the default configuration.
  63.  
  64.  
  65. # Global configuration
  66. #
  67.  
  68. #
  69. # ServerRoot: The top of the directory tree under which the server's
  70. # configuration, error, and log files are kept.
  71. #
  72. # NOTE! If you intend to place this on an NFS (or otherwise network)
  73. # mounted filesystem then please read the LockFile documentation (available
  74. # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
  75. # you will save yourself a lot of trouble.
  76. #
  77. # Do NOT add a slash at the end of the directory path.
  78. #
  79. #ServerRoot "/etc/apache2"
  80.  
  81. #
  82. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  83. #
  84. LockFile ${APACHE_LOCK_DIR}/accept.lock
  85.  
  86. #
  87. # PidFile: The file in which the server should record its process
  88. # identification number when it starts.
  89. # This needs to be set in /etc/apache2/envvars
  90. #
  91. PidFile ${APACHE_PID_FILE}
  92.  
  93. #
  94. # Timeout: The number of seconds before receives and sends time out.
  95. #
  96. Timeout 300
  97.  
  98. #
  99. # KeepAlive: Whether or not to allow persistent connections (more than
  100. # one request per connection). Set to "Off" to deactivate.
  101. #
  102. KeepAlive On
  103.  
  104. #
  105. # MaxKeepAliveRequests: The maximum number of requests to allow
  106. # during a persistent connection. Set to 0 to allow an unlimited amount.
  107. # We recommend you leave this number high, for maximum performance.
  108. #
  109. MaxKeepAliveRequests 100
  110.  
  111. #
  112. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  113. # same client on the same connection.
  114. #
  115. KeepAliveTimeout 5
  116.  
  117. ##
  118. ## Server-Pool Size Regulation (MPM specific)
  119. ##
  120.  
  121. # prefork MPM
  122. # StartServers: number of server processes to start
  123. # MinSpareServers: minimum number of server processes which are kept spare
  124. # MaxSpareServers: maximum number of server processes which are kept spare
  125. # MaxClients: maximum number of server processes allowed to start
  126. # MaxRequestsPerChild: maximum number of requests a server process serves
  127. <IfModule mpm_prefork_module>
  128. StartServers 5
  129. MinSpareServers 5
  130. MaxSpareServers 10
  131. MaxClients 150
  132. MaxRequestsPerChild 0
  133. </IfModule>
  134.  
  135. # worker MPM
  136. # StartServers: initial number of server processes to start
  137. # MinSpareThreads: minimum number of worker threads which are kept spare
  138. # MaxSpareThreads: maximum number of worker threads which are kept spare
  139. # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
  140. # graceful restart. ThreadLimit can only be changed by stopping
  141. # and starting Apache.
  142. # ThreadsPerChild: constant number of worker threads in each server process
  143. # MaxClients: maximum number of simultaneous client connections
  144. # MaxRequestsPerChild: maximum number of requests a server process serves
  145. <IfModule mpm_worker_module>
  146. StartServers 2
  147. MinSpareThreads 25
  148. MaxSpareThreads 75
  149. ThreadLimit 64
  150. ThreadsPerChild 25
  151. MaxClients 150
  152. MaxRequestsPerChild 0
  153. </IfModule>
  154.  
  155. # event MPM
  156. # StartServers: initial number of server processes to start
  157. # MinSpareThreads: minimum number of worker threads which are kept spare
  158. # MaxSpareThreads: maximum number of worker threads which are kept spare
  159. # ThreadsPerChild: constant number of worker threads in each server process
  160. # MaxClients: maximum number of simultaneous client connections
  161. # MaxRequestsPerChild: maximum number of requests a server process serves
  162. <IfModule mpm_event_module>
  163. StartServers 2
  164. MinSpareThreads 25
  165. MaxSpareThreads 75
  166. ThreadLimit 64
  167. ThreadsPerChild 25
  168. MaxClients 150
  169. MaxRequestsPerChild 0
  170. </IfModule>
  171.  
  172. # These need to be set in /etc/apache2/envvars
  173. User ${APACHE_RUN_USER}
  174. Group ${APACHE_RUN_GROUP}
  175.  
  176. #
  177. # AccessFileName: The name of the file to look for in each directory
  178. # for additional configuration directives. See also the AllowOverride
  179. # directive.
  180. #
  181.  
  182. AccessFileName .htaccess
  183.  
  184. #
  185. # The following lines prevent .htaccess and .htpasswd files from being
  186. # viewed by Web clients.
  187. #
  188. <Files ~ "^\.ht">
  189. Order allow,deny
  190. Deny from all
  191. Satisfy all
  192. </Files>
  193.  
  194. #
  195. # DefaultType is the default MIME type the server will use for a document
  196. # if it cannot otherwise determine one, such as from filename extensions.
  197. # If your server contains mostly text or HTML documents, "text/plain" is
  198. # a good value. If most of your content is binary, such as applications
  199. # or images, you may want to use "application/octet-stream" instead to
  200. # keep browsers from trying to display binary files as though they are
  201. # text.
  202. #
  203. # It is also possible to omit any default MIME type and let the
  204. # client's browser guess an appropriate action instead. Typically the
  205. # browser will decide based on the file's extension then. In cases
  206. # where no good assumption can be made, letting the default MIME type
  207. # unset is suggested instead of forcing the browser to accept
  208. # incorrect metadata.
  209. #
  210. DefaultType None
  211.  
  212.  
  213. #
  214. # HostnameLookups: Log the names of clients or just their IP addresses
  215. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  216. # The default is off because it'd be overall better for the net if people
  217. # had to knowingly turn this feature on, since enabling it means that
  218. # each client request will result in AT LEAST one lookup request to the
  219. # nameserver.
  220. #
  221. HostnameLookups Off
  222.  
  223. # ErrorLog: The location of the error log file.
  224. # If you do not specify an ErrorLog directive within a <VirtualHost>
  225. # container, error messages relating to that virtual host will be
  226. # logged here. If you *do* define an error logfile for a <VirtualHost>
  227. # container, that host's errors will be logged there and not here.
  228. #
  229. ErrorLog ${APACHE_LOG_DIR}/error.log
  230.  
  231. #
  232. # LogLevel: Control the number of messages logged to the error_log.
  233. # Possible values include: debug, info, notice, warn, error, crit,
  234. # alert, emerg.
  235. #
  236. LogLevel warn
  237.  
  238. # Include module configuration:
  239. Include mods-enabled/*.load
  240. Include mods-enabled/*.conf
  241.  
  242. # Include list of ports to listen on and which to use for name based vhosts
  243. Include ports.conf
  244.  
  245. #
  246. # The following directives define some format nicknames for use with
  247. # a CustomLog directive (see below).
  248. # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
  249. #
  250. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  251. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  252. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  253. LogFormat "%{Referer}i -> %U" referer
  254. LogFormat "%{User-agent}i" agent
  255.  
  256. # Include of directories ignores editors' and dpkg's backup files,
  257. # see the comments above for details.
  258.  
  259. # Include generic snippets of statements
  260. Include conf.d/
  261.  
  262. # Include the virtual host configurations:
  263. Include sites-enabled/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement