Advertisement
Guest User

httpd.conf

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