Advertisement
koberkober

apache2.conf

Nov 25th, 2014
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.41 KB | None | 0 0
  1. philipp@VMbox:~$ cat /etc/apache2/apache2.conf
  2. # This is the main Apache server configuration file. It contains the
  3. # configuration directives that give the server its instructions.
  4. # See http://httpd.apache.org/docs/2.4/ for detailed information about
  5. # the directives and /usr/share/doc/apache2/README.Debian about Debian specific
  6. # hints.
  7. #
  8. #
  9. # Summary of how the Apache 2 configuration works in Debian:
  10. # The Apache 2 web server configuration in Debian is quite different to
  11. # upstream's suggested way to configure the web server. This is because Debian's
  12. # default Apache2 installation attempts to make adding and removing modules,
  13. # virtual hosts, and extra configuration directives as flexible as possible, in
  14. # order to make automating the changes and administering the server as easy as
  15. # possible.
  16.  
  17. # It is split into several files forming the configuration hierarchy outlined
  18. # below, all located in the /etc/apache2/ directory:
  19. #
  20. # /etc/apache2/
  21. # |-- apache2.conf
  22. # | `-- ports.conf
  23. # |-- mods-enabled
  24. # | |-- *.load
  25. # | `-- *.conf
  26. # |-- conf-enabled
  27. # | `-- *.conf
  28. # `-- sites-enabled
  29. # `-- *.conf
  30. #
  31. #
  32. # * apache2.conf is the main configuration file (this file). It puts the pieces
  33. # together by including all remaining configuration files when starting up the
  34. # web server.
  35. #
  36. # * ports.conf is always included from the main configuration file. It is
  37. # supposed to determine listening ports for incoming connections which can be
  38. # customized anytime.
  39. #
  40. # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
  41. # directories contain particular configuration snippets which manage modules,
  42. # global configuration fragments, or virtual host configurations,
  43. # respectively.
  44. #
  45. # They are activated by symlinking available configuration files from their
  46. # respective *-available/ counterparts. These should be managed by using our
  47. # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
  48. # their respective man pages for detailed information.
  49. #
  50. # * The binary is called apache2. Due to the use of environment variables, in
  51. # the default configuration, apache2 needs to be started/stopped with
  52. # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
  53. # work with the default configuration.
  54.  
  55.  
  56. # Global configuration
  57. #
  58.  
  59. #
  60. # ServerRoot: The top of the directory tree under which the server's
  61. # configuration, error, and log files are kept.
  62. #
  63. # NOTE! If you intend to place this on an NFS (or otherwise network)
  64. # mounted filesystem then please read the Mutex documentation (available
  65. # at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
  66. # you will save yourself a lot of trouble.
  67. #
  68. # Do NOT add a slash at the end of the directory path.
  69. #
  70. #ServerRoot "/etc/apache2"
  71.  
  72. #
  73. # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
  74. #
  75. Mutex file:${APACHE_LOCK_DIR} default
  76.  
  77. #
  78. # PidFile: The file in which the server should record its process
  79. # identification number when it starts.
  80. # This needs to be set in /etc/apache2/envvars
  81. #
  82. PidFile ${APACHE_PID_FILE}
  83.  
  84. #
  85. # Timeout: The number of seconds before receives and sends time out.
  86. #
  87. Timeout 300
  88.  
  89. #
  90. # KeepAlive: Whether or not to allow persistent connections (more than
  91. # one request per connection). Set to "Off" to deactivate.
  92. #
  93. KeepAlive On
  94.  
  95. #
  96. # MaxKeepAliveRequests: The maximum number of requests to allow
  97. # during a persistent connection. Set to 0 to allow an unlimited amount.
  98. # We recommend you leave this number high, for maximum performance.
  99. #
  100. MaxKeepAliveRequests 100
  101.  
  102. #
  103. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  104. # same client on the same connection.
  105. #
  106. KeepAliveTimeout 5
  107.  
  108.  
  109. # These need to be set in /etc/apache2/envvars
  110. User ${APACHE_RUN_USER}
  111. Group ${APACHE_RUN_GROUP}
  112.  
  113. #
  114. # HostnameLookups: Log the names of clients or just their IP addresses
  115. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  116. # The default is off because it'd be overall better for the net if people
  117. # had to knowingly turn this feature on, since enabling it means that
  118. # each client request will result in AT LEAST one lookup request to the
  119. # nameserver.
  120. #
  121. HostnameLookups Off
  122.  
  123. # ErrorLog: The location of the error log file.
  124. # If you do not specify an ErrorLog directive within a <VirtualHost>
  125. # container, error messages relating to that virtual host will be
  126. # logged here. If you *do* define an error logfile for a <VirtualHost>
  127. # container, that host's errors will be logged there and not here.
  128. #
  129. ErrorLog ${APACHE_LOG_DIR}/error.log
  130.  
  131. #
  132. # LogLevel: Control the severity of messages logged to the error_log.
  133. # Available values: trace8, ..., trace1, debug, info, notice, warn,
  134. # error, crit, alert, emerg.
  135. # It is also possible to configure the log level for particular modules, e.g.
  136. # "LogLevel info ssl:warn"
  137. #
  138. LogLevel warn
  139.  
  140. # Include module configuration:
  141. IncludeOptional mods-enabled/*.load
  142. IncludeOptional mods-enabled/*.conf
  143.  
  144. # Include list of ports to listen on
  145. Include ports.conf
  146.  
  147.  
  148. # Sets the default security model of the Apache2 HTTPD server. It does
  149. # not allow access to the root filesystem outside of /usr/share and /var/www.
  150. # The former is used by web applications packaged in Debian,
  151. # the latter may be used for local directories served by the web server. If
  152. # your system is serving content from a sub-directory in /srv you must allow
  153. # access here, or in any related virtual host.
  154. <Directory />
  155. Options FollowSymLinks
  156. AllowOverride None
  157. Require all denied
  158. </Directory>
  159.  
  160. <Directory /usr/share>
  161. AllowOverride None
  162. Require all granted
  163. </Directory>
  164.  
  165. <Directory /var/www/>
  166. Options Indexes FollowSymLinks
  167. AllowOverride None
  168. Require all granted
  169. </Directory>
  170.  
  171. #<Directory /srv/>
  172. # Options Indexes FollowSymLinks
  173. # AllowOverride None
  174. # Require all granted
  175. #</Directory>
  176.  
  177.  
  178.  
  179.  
  180. # AccessFileName: The name of the file to look for in each directory
  181. # for additional configuration directives. See also the AllowOverride
  182. # directive.
  183. #
  184. AccessFileName .htaccess
  185.  
  186. #
  187. # The following lines prevent .htaccess and .htpasswd files from being
  188. # viewed by Web clients.
  189. #
  190. <FilesMatch "^\.ht">
  191. Require all denied
  192. </FilesMatch>
  193.  
  194.  
  195. #
  196. # The following directives define some format nicknames for use with
  197. # a CustomLog directive.
  198. #
  199. # These deviate from the Common Log Format definitions in that they use %O
  200. # (the actual bytes sent including headers) instead of %b (the size of the
  201. # requested file), because the latter makes it impossible to detect partial
  202. # requests.
  203. #
  204. # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
  205. # Use mod_remoteip instead.
  206. #
  207. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
  208. LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
  209. LogFormat "%h %l %u %t \"%r\" %>s %O" common
  210. LogFormat "%{Referer}i -> %U" referer
  211. LogFormat "%{User-agent}i" agent
  212.  
  213. # Include of directories ignores editors' and dpkg's backup files,
  214. # see README.Debian for details.
  215.  
  216. # Include generic snippets of statements
  217. IncludeOptional conf-enabled/*.conf
  218.  
  219. # Include the virtual host configurations:
  220. IncludeOptional sites-enabled/*.conf
  221.  
  222. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  223.  
  224. Alias /bugzilla/ /var/www/bugzilla/
  225. <directory /var/www/bugzilla>
  226. Addhandler cgi-script .cgi .pl
  227. Options +Indexes +ExecCGI +FollowSymLinks
  228. DirectoryIndex index.cgi
  229. AllowOverride All
  230. </directory>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement