MinasFilm

apache2.conf

Dec 19th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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 300
  68.  
  69.  
  70.  
  71. #
  72. # KeepAlive: Whether or not to allow persistent connections (more than
  73. # one request per connection). Set to "Off" to deactivate.
  74. #
  75. KeepAlive On
  76.  
  77. #
  78. # MaxKeepAliveRequests: The maximum number of requests to allow
  79. # during a persistent connection. Set to 0 to allow an unlimited amount.
  80. # We recommend you leave this number high, for maximum performance.
  81. #
  82. MaxKeepAliveRequests 100
  83.  
  84. #
  85. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  86. # same client on the same connection.
  87. #
  88. KeepAliveTimeout 5
  89.  
  90. ##
  91. ## Server-Pool Size Regulation (MPM specific)
  92. ##
  93.  
  94. # prefork MPM
  95. # StartServers: number of server processes to start
  96. # MinSpareServers: minimum number of server processes which are kept spare
  97. # MaxSpareServers: maximum number of server processes which are kept spare
  98. # MaxClients: maximum number of server processes allowed to start
  99. # MaxRequestsPerChild: maximum number of requests a server process serves
  100. <IfModule mpm_prefork_module>
  101.     StartServers          5
  102.     MinSpareServers       5
  103.     MaxSpareServers      10
  104.     MaxClients          150
  105.     MaxRequestsPerChild   0
  106. </IfModule>
  107.  
  108. AddDefaultCharset WINDOWS-1251
  109.  
  110. # worker MPM
  111. # StartServers: initial number of server processes to start
  112. # MinSpareThreads: minimum number of worker threads which are kept spare
  113. # MaxSpareThreads: maximum number of worker threads which are kept spare
  114. # ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
  115. #              graceful restart. ThreadLimit can only be changed by stopping
  116. #              and starting Apache.
  117. # ThreadsPerChild: constant number of worker threads in each server process
  118. # MaxClients: maximum number of simultaneous client connections
  119. # MaxRequestsPerChild: maximum number of requests a server process serves
  120. <IfModule mpm_worker_module>
  121.     StartServers          2
  122.     MinSpareThreads      25
  123.     MaxSpareThreads      75
  124.     ThreadLimit          64
  125.     ThreadsPerChild      25
  126.     MaxClients          150
  127.     MaxRequestsPerChild   0
  128. </IfModule>
  129.  
  130. <IfModule dir_module>
  131.     DirectoryIndex index.htm index.html index.phtml index.php
  132. </IfModule>
  133.  
  134. #
  135. # The following lines prevent .htaccess and .htpasswd files from being
  136. # viewed by Web clients.
  137. #
  138. <FilesMatch "^\.ht">
  139.     Order allow,deny
  140.     Deny from all
  141. </FilesMatch>
  142.  
  143. # event MPM
  144. # StartServers: initial number of server processes to start
  145. # MinSpareThreads: minimum number of worker threads which are kept spare
  146. # MaxSpareThreads: maximum number of worker threads which are kept spare
  147. # ThreadsPerChild: constant number of worker threads in each server process
  148. # MaxClients: maximum number of simultaneous client connections
  149. # MaxRequestsPerChild: maximum number of requests a server process serves
  150. <IfModule mpm_event_module>
  151.     StartServers          2
  152.     MinSpareThreads      25
  153.     MaxSpareThreads      75
  154.     ThreadLimit          64
  155.     ThreadsPerChild      25
  156.     MaxClients          150
  157.     MaxRequestsPerChild   0
  158. </IfModule>
  159.  
  160. # These need to be set in /etc/apache2/envvars
  161. User ${APACHE_RUN_USER}
  162. Group ${APACHE_RUN_GROUP}
  163.  
  164. #
  165. # AccessFileName: The name of the file to look for in each directory
  166. # for additional configuration directives.  See also the AllowOverride
  167. # directive.
  168. #
  169.  
  170. AccessFileName .htaccess
  171.  
  172. #
  173. # The following lines prevent .htaccess and .htpasswd files from being
  174. # viewed by Web clients.
  175. #
  176. <Files ~ "^\.ht">
  177.     Order allow,deny
  178.     Deny from all
  179.     Satisfy all
  180. </Files>
  181.  
  182. #
  183. # DefaultType is the default MIME type the server will use for a document
  184. # if it cannot otherwise determine one, such as from filename extensions.
  185. # If your server contains mostly text or HTML documents, "text/plain" is
  186. # a good value.  If most of your content is binary, such as applications
  187. # or images, you may want to use "application/octet-stream" instead to
  188. # keep browsers from trying to display binary files as though they are
  189. # text.
  190. #
  191. # It is also possible to omit any default MIME type and let the
  192. # client's browser guess an appropriate action instead. Typically the
  193. # browser will decide based on the file's extension then. In cases
  194. # where no good assumption can be made, letting the default MIME type
  195. # unset is suggested  instead of forcing the browser to accept
  196. # incorrect  metadata.
  197. #
  198. DefaultType text/plain
  199.  
  200. <IfModule mime_module>
  201.     #
  202.     # TypesConfig points to the file containing the list of mappings from
  203.     # filename extension to MIME-type.
  204.     #
  205.     TypesConfig conf/mime.types
  206.  
  207.     #
  208.     # AddType allows you to add to or override the MIME configuration
  209.     # file specified in TypesConfig for specific file types.
  210.     #
  211.     #AddType application/x-gzip .tgz
  212.     #
  213.     # AddEncoding allows you to have certain browsers uncompress
  214.     # information on the fly. Note: Not all browsers support this.
  215.     #
  216.     #AddEncoding x-compress .Z
  217.     #AddEncoding x-gzip .gz .tgz
  218.     #
  219.     # If the AddEncoding directives above are commented-out, then you
  220.     # probably should define those extensions to indicate media types:
  221.     #
  222.     AddType application/x-compress .Z
  223.     AddType application/x-gzip .gz .tgz
  224.     AddType application/x-httpd-php .php
  225.     #
  226.     # AddHandler allows you to map certain file extensions to "handlers":
  227.     # actions unrelated to filetype. These can be either built into the server
  228.     # or added with the Action directive (see below)
  229.     #
  230.     # To use CGI scripts outside of ScriptAliased directories:
  231.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  232.     #
  233.     #AddHandler cgi-script .cgi
  234.  
  235.     # For type maps (negotiated resources):
  236.     #AddHandler type-map var
  237.  
  238.     #
  239.     # Filters allow you to process content before it is sent to the client.
  240.     #
  241.     # To parse .shtml files for server-side includes (SSI):
  242.     # (You will also need to add "Includes" to the "Options" directive.)
  243.     #
  244.     #AddType text/html .shtml
  245.     #AddOutputFilter INCLUDES .shtml
  246. </IfModule>
  247.  
  248. #
  249. # HostnameLookups: Log the names of clients or just their IP addresses
  250. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  251. # The default is off because it'd be overall better for the net if people
  252. # had to knowingly turn this feature on, since enabling it means that
  253. # each client request will result in AT LEAST one lookup request to the
  254. # nameserver.
  255. #
  256. HostnameLookups Off
  257.  
  258. # ErrorLog: The location of the error log file.
  259. # If you do not specify an ErrorLog directive within a <VirtualHost>
  260. # container, error messages relating to that virtual host will be
  261. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  262. # container, that host's errors will be logged there and not here.
  263. #
  264. ErrorLog ${APACHE_LOG_DIR}/error.log
  265.  
  266. #
  267. # LogLevel: Control the number of messages logged to the error_log.
  268. # Possible values include: debug, info, notice, warn, error, crit,
  269. # alert, emerg.
  270. #
  271. LogLevel warn
  272.  
  273. # Include module configuration:
  274. Include mods-enabled/*.load
  275. Include mods-enabled/*.conf
  276.  
  277. # Include all the user configurations:
  278. Include httpd.conf
  279.  
  280. # Include ports listing
  281. Include ports.conf
  282.  
  283. #
  284. # The following directives define some format nicknames for use with
  285. # a CustomLog directive (see below).
  286. # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
  287. #
  288. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  289. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  290. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  291. LogFormat "%{Referer}i -> %U" referer
  292. LogFormat "%{User-agent}i" agent
  293.  
  294. # Include of directories ignores editors' and dpkg's backup files,
  295. # see README.Debian for details.
  296.  
  297. # Include generic snippets of statements
  298. Include conf.d/
  299.  
  300. # Include the virtual host configurations:
  301. Include sites-enabled/
  302.  
  303. ServerName 127.0.0.1
Advertisement
Add Comment
Please, Sign In to add comment