Advertisement
Guest User

Untitled

a guest
May 15th, 2012
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.33 KB | None | 0 0
  1. #
  2. # Based upon the NCSA server configuration files originally by Rob McCool.
  3. #
  4. # This is the main Apache server configuration file. It contains the
  5. # configuration directives that give the server its instructions.
  6. # See http://httpd.apache.org/docs/2.2/ for detailed information about
  7. # the directives.
  8. #
  9. # Do NOT simply read the instructions in here without understanding
  10. # what they do. They're here only as hints or reminders. If you are unsure
  11. # consult the online docs. You have been warned.
  12. #
  13. # The configuration directives are grouped into three basic sections:
  14. # 1. Directives that control the operation of the Apache server process as a
  15. # whole (the 'global environment').
  16. # 2. Directives that define the parameters of the 'main' or 'default' server,
  17. # which responds to requests that aren't handled by a virtual host.
  18. # These directives also provide default values for the settings
  19. # of all virtual hosts.
  20. # 3. Settings for virtual hosts, which allow Web requests to be sent to
  21. # different IP addresses or hostnames and have them handled by the
  22. # same Apache server process.
  23. #
  24. # Configuration and logfile names: If the filenames you specify for many
  25. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  26. # server will use that explicit path. If the filenames do *not* begin
  27. # with "/", the value of ServerRoot is prepended -- so "foo.log"
  28. # with ServerRoot set to "/etc/apache2" will be interpreted by the
  29. # server as "/etc/apache2/foo.log".
  30. #
  31.  
  32. ### Section 1: Global Environment
  33. #
  34. # The directives in this section affect the overall operation of Apache,
  35. # such as the number of concurrent requests it can handle or where it
  36. # can find its configuration files.
  37. #
  38.  
  39. #
  40. # ServerRoot: The top of the directory tree under which the server's
  41. # configuration, error, and log files are kept.
  42. #
  43. # NOTE! If you intend to place this on an NFS (or otherwise network)
  44. # mounted filesystem then please read the LockFile documentation (available
  45. # at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
  46. # you will save yourself a lot of trouble.
  47. #
  48. # Do NOT add a slash at the end of the directory path.
  49. #
  50. #ServerRoot "/etc/apache2"
  51.  
  52. #
  53. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  54. #
  55. LockFile ${APACHE_LOCK_DIR}/accept.lock
  56.  
  57. #
  58. # PidFile: The file in which the server should record its process
  59. # identification number when it starts.
  60. # This needs to be set in /etc/apache2/envvars
  61. #
  62. PidFile ${APACHE_PID_FILE}
  63.  
  64. #
  65. # Timeout: The number of seconds before receives and sends time out.
  66. #
  67. Timeout 15
  68.  
  69. #
  70. # KeepAlive: Whether or not to allow persistent connections (more than
  71. # one request per connection). Set to "Off" to deactivate.
  72. #
  73. KeepAlive On
  74.  
  75. #
  76. # MaxKeepAliveRequests: The maximum number of requests to allow
  77. # during a persistent connection. Set to 0 to allow an unlimited amount.
  78. # We recommend you leave this number high, for maximum performance.
  79. #
  80. MaxKeepAliveRequests 30
  81.  
  82. #
  83. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  84. # same client on the same connection.
  85. #
  86. KeepAliveTimeout 5
  87.  
  88. ##
  89. ## Server-Pool Size Regulation (MPM specific)
  90. ##
  91.  
  92. # prefork MPM
  93. # StartServers: number of server processes to start
  94. # MinSpareServers: minimum number of server processes which are kept spare
  95. # MaxSpareServers: maximum number of server processes which are kept spare
  96. # MaxClients: maximum number of server processes allowed to start
  97. # MaxRequestsPerChild: maximum number of requests a server process serves
  98. <IfModule prefork.c>
  99. StartServers 2
  100. MinSpareThreads 25
  101. MaxSpareThreads 75
  102. ThreadLimit 64
  103. ThreadsPerChild 25
  104. MaxClients 75
  105. MaxRequestsPerChild 2500
  106. </IfModule>
  107.  
  108. # worker MPM
  109. # StartServers: initial number of server processes to start
  110. # MinSpareThreads: minimum number of worker threads which are kept spare
  111. # MaxSpareThreads: maximum number of worker threads which are kept spare
  112. # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
  113. # graceful restart. ThreadLimit can only be changed by stopping
  114. # and starting Apache.
  115. # ThreadsPerChild: constant number of worker threads in each server process
  116. # MaxClients: maximum number of simultaneous client connections
  117. # MaxRequestsPerChild: maximum number of requests a server process serves
  118. <IfModule mpm_worker_module>
  119. StartServers 2
  120. MinSpareThreads 25
  121. MaxSpareThreads 75
  122. ThreadLimit 64
  123. ThreadsPerChild 25
  124. MaxClients 75
  125. MaxRequestsPerChild 2500
  126. </IfModule>
  127.  
  128. # event MPM
  129. # StartServers: initial number of server processes to start
  130. # MinSpareThreads: minimum number of worker threads which are kept spare
  131. # MaxSpareThreads: maximum number of worker threads which are kept spare
  132. # ThreadsPerChild: constant number of worker threads in each server process
  133. # MaxClients: maximum number of simultaneous client connections
  134. # MaxRequestsPerChild: maximum number of requests a server process serves
  135. <IfModule mpm_event_module>
  136. StartServers 2
  137. MinSpareThreads 25
  138. MaxSpareThreads 75
  139. ThreadLimit 64
  140. ThreadsPerChild 25
  141. MaxClients 75
  142. MaxRequestsPerChild 2500
  143. </IfModule>
  144.  
  145. # These need to be set in /etc/apache2/envvars
  146. User ${APACHE_RUN_USER}
  147. Group ${APACHE_RUN_GROUP}
  148.  
  149. #
  150. # AccessFileName: The name of the file to look for in each directory
  151. # for additional configuration directives. See also the AllowOverride
  152. # directive.
  153. #
  154.  
  155. AccessFileName .htaccess
  156.  
  157. #
  158. # The following lines prevent .htaccess and .htpasswd files from being
  159. # viewed by Web clients.
  160. #
  161. <Files ~ "^\.ht">
  162. Order allow,deny
  163. Deny from all
  164. Satisfy all
  165. </Files>
  166.  
  167. #
  168. # DefaultType is the default MIME type the server will use for a document
  169. # if it cannot otherwise determine one, such as from filename extensions.
  170. # If your server contains mostly text or HTML documents, "text/plain" is
  171. # a good value. If most of your content is binary, such as applications
  172. # or images, you may want to use "application/octet-stream" instead to
  173. # keep browsers from trying to display binary files as though they are
  174. # text.
  175. #
  176. DefaultType text/plain
  177.  
  178.  
  179. #
  180. # HostnameLookups: Log the names of clients or just their IP addresses
  181. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  182. # The default is off because it'd be overall better for the net if people
  183. # had to knowingly turn this feature on, since enabling it means that
  184. # each client request will result in AT LEAST one lookup request to the
  185. # nameserver.
  186. #
  187. HostnameLookups Off
  188.  
  189. # ErrorLog: The location of the error log file.
  190. # If you do not specify an ErrorLog directive within a <VirtualHost>
  191. # container, error messages relating to that virtual host will be
  192. # logged here. If you *do* define an error logfile for a <VirtualHost>
  193. # container, that host's errors will be logged there and not here.
  194. #
  195. ErrorLog ${APACHE_LOG_DIR}/error.log
  196.  
  197. #
  198. # LogLevel: Control the number of messages logged to the error_log.
  199. # Possible values include: debug, info, notice, warn, error, crit,
  200. # alert, emerg.
  201. #
  202. LogLevel warn
  203.  
  204. # Include module configuration:
  205. Include mods-enabled/*.load
  206. Include mods-enabled/*.conf
  207.  
  208. # Include all the user configurations:
  209. Include httpd.conf
  210.  
  211. # Include ports listing
  212. Include ports.conf
  213.  
  214. #
  215. # The following directives define some format nicknames for use with
  216. # a CustomLog directive (see below).
  217. # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
  218. #
  219. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  220. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  221. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  222. LogFormat "%{Referer}i -> %U" referer
  223. LogFormat "%{User-agent}i" agent
  224.  
  225. # Include of directories ignores editors' and dpkg's backup files,
  226. # see README.Debian for details.
  227.  
  228. # Include generic snippets of statements
  229. Include conf.d/
  230.  
  231. # Include the virtual host configurations:
  232. Include sites-enabled/
  233.  
  234.  
  235.  
  236. <Directory /var/www/html/>
  237. AllowOverride All
  238. </Directory>
  239. SSLProtocol ALL -SSLv2
  240. SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:AES256-SHA256:RC4:HIGH:MEDIUM:+TLSv1:!MD5:!SSLv2:+SSLv3:!ADH:!aNULL:!eNULL:!NULL:!DH:!ADH:!EDH:!AESGCM
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement