Advertisement
Guest User

Untitled

a guest
Jun 29th, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.84 KB | None | 0 0
  1. #
  2. # This is the main Apache HTTP server configuration file. It contains the
  3. # configuration directives that give the server its instructions.
  4. # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
  5. # In particular, see
  6. # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
  7. # for a discussion of each configuration directive.
  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. # Configuration and logfile names: If the filenames you specify for many
  14. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  15. # server will use that explicit path. If the filenames do *not* begin
  16. # with "/", the value of ServerRoot is prepended -- so 'log/access_log'
  17. # with ServerRoot set to '/www' will be interpreted by the
  18. # server as '/www/log/access_log', where as '/log/access_log' will be
  19. # interpreted as '/log/access_log'.
  20.  
  21. #
  22. # ServerRoot: The top of the directory tree under which the server's
  23. # configuration, error, and log files are kept.
  24. #
  25. # Do not add a slash at the end of the directory path. If you point
  26. # ServerRoot at a non-local disk, be sure to specify a local disk on the
  27. # Mutex directive, if file-based mutexes are used. If you wish to share the
  28. # same ServerRoot for multiple httpd daemons, you will need to change at
  29. # least PidFile.
  30. #
  31. ServerRoot "/etc/httpd"
  32.  
  33. #
  34. # Listen: Allows you to bind Apache to specific IP addresses and/or
  35. # ports, instead of the default. See also the <VirtualHost>
  36. # directive.
  37. #
  38. # Change this to Listen on specific IP addresses as shown below to
  39. # prevent Apache from glomming onto all bound IP addresses.
  40. #
  41. #Listen 12.34.56.78:80
  42. Listen 80
  43.  
  44. #
  45. # Dynamic Shared Object (DSO) Support
  46. #
  47. # To be able to use the functionality of a module which was built as a DSO you
  48. # have to place corresponding `LoadModule' lines at this location so the
  49. # directives contained in it are actually available _before_ they are used.
  50. # Statically compiled modules (those listed by `httpd -l') do not need
  51. # to be loaded here.
  52. #
  53. # Example:
  54. # LoadModule foo_module modules/mod_foo.so
  55. #
  56. Include conf.modules.d/*.conf
  57.  
  58. #
  59. # If you wish httpd to run as a different user or group, you must run
  60. # httpd as root initially and it will switch.
  61. #
  62. # User/Group: The name (or #number) of the user/group to run httpd as.
  63. # It is usually good practice to create a dedicated user and group for
  64. # running httpd, as with most system services.
  65. #
  66. User apache
  67. Group apache
  68.  
  69. # 'Main' server configuration
  70. #
  71. # The directives in this section set up the values used by the 'main'
  72. # server, which responds to any requests that aren't handled by a
  73. # <VirtualHost> definition. These values also provide defaults for
  74. # any <VirtualHost> containers you may define later in the file.
  75. #
  76. # All of these directives may appear inside <VirtualHost> containers,
  77. # in which case these default settings will be overridden for the
  78. # virtual host being defined.
  79. #
  80.  
  81. #
  82. # ServerAdmin: Your address, where problems with the server should be
  83. # e-mailed. This address appears on some server-generated pages, such
  84. # as error documents. e.g. admin@your-domain.com
  85. #
  86. ServerAdmin root@localhost
  87.  
  88. #
  89. # ServerName gives the name and port that the server uses to identify itself.
  90. # This can often be determined automatically, but we recommend you specify
  91. # it explicitly to prevent problems during startup.
  92. #
  93. # If your host doesn't have a registered DNS name, enter its IP address here.
  94. #
  95. #ServerName www.example.com:80
  96.  
  97. #
  98. # Deny access to the entirety of your server's filesystem. You must
  99. # explicitly permit access to web content directories in other
  100. # <Directory> blocks below.
  101. #
  102. <Directory />
  103. AllowOverride none
  104. Require all denied
  105. </Directory>
  106.  
  107. #
  108. # Note that from this point forward you must specifically allow
  109. # particular features to be enabled - so if something's not working as
  110. # you might expect, make sure that you have specifically enabled it
  111. # below.
  112. #
  113.  
  114. #
  115. # DocumentRoot: The directory out of which you will serve your
  116. # documents. By default, all requests are taken from this directory, but
  117. # symbolic links and aliases may be used to point to other locations.
  118. #
  119. DocumentRoot "/var/www/html"
  120.  
  121. #
  122. # Relax access to content within /var/www.
  123. #
  124. <Directory "/var/www">
  125. AllowOverride None
  126. # Allow open access:
  127. Require all granted
  128. allow from all
  129. </Directory>
  130.  
  131. # Further relax access to the default document root:
  132. <Directory "/var/www/html">
  133. #
  134. # Possible values for the Options directive are "None", "All",
  135. # or any combination of:
  136. # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  137. #
  138. # Note that "MultiViews" must be named *explicitly* --- "Options All"
  139. # doesn't give it to you.
  140. #
  141. # The Options directive is both complicated and important. Please see
  142. # http://httpd.apache.org/docs/2.4/mod/core.html#options
  143. # for more information.
  144. #
  145. Options Indexes FollowSymLinks
  146.  
  147. #
  148. # AllowOverride controls what directives may be placed in .htaccess files.
  149. # It can be "All", "None", or any combination of the keywords:
  150. # Options FileInfo AuthConfig Limit
  151. #
  152. AllowOverride None
  153.  
  154. #
  155. # Controls who can get stuff from this server.
  156. #
  157. Require all granted
  158. </Directory>
  159.  
  160. #
  161. # DirectoryIndex: sets the file that Apache will serve if a directory
  162. # is requested.
  163. #
  164. <IfModule dir_module>
  165. DirectoryIndex index.html
  166. </IfModule>
  167.  
  168. #
  169. # The following lines prevent .htaccess and .htpasswd files from being
  170. # viewed by Web clients.
  171. #
  172. <Files ".ht*">
  173. Require all denied
  174. </Files>
  175.  
  176. #
  177. # ErrorLog: The location of the error log file.
  178. # If you do not specify an ErrorLog directive within a <VirtualHost>
  179. # container, error messages relating to that virtual host will be
  180. # logged here. If you *do* define an error logfile for a <VirtualHost>
  181. # container, that host's errors will be logged there and not here.
  182. #
  183. ErrorLog "logs/error_log"
  184.  
  185. #
  186. # LogLevel: Control the number of messages logged to the error_log.
  187. # Possible values include: debug, info, notice, warn, error, crit,
  188. # alert, emerg.
  189. #
  190. LogLevel warn
  191.  
  192. <IfModule log_config_module>
  193. #
  194. # The following directives define some format nicknames for use with
  195. # a CustomLog directive (see below).
  196. #
  197. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  198. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  199.  
  200. <IfModule logio_module>
  201. # You need to enable mod_logio.c to use %I and %O
  202. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  203. </IfModule>
  204.  
  205. #
  206. # The location and format of the access logfile (Common Logfile Format).
  207. # If you do not define any access logfiles within a <VirtualHost>
  208. # container, they will be logged here. Contrariwise, if you *do*
  209. # define per-<VirtualHost> access logfiles, transactions will be
  210. # logged therein and *not* in this file.
  211. #
  212. #CustomLog "logs/access_log" common
  213.  
  214. #
  215. # If you prefer a logfile with access, agent, and referer information
  216. # (Combined Logfile Format) you can use the following directive.
  217. #
  218. CustomLog "logs/access_log" combined
  219. </IfModule>
  220.  
  221. <IfModule alias_module>
  222. #
  223. # Redirect: Allows you to tell clients about documents that used to
  224. # exist in your server's namespace, but do not anymore. The client
  225. # will make a new request for the document at its new location.
  226. # Example:
  227. # Redirect permanent /foo http://www.example.com/bar
  228.  
  229. #
  230. # Alias: Maps web paths into filesystem paths and is used to
  231. # access content that does not live under the DocumentRoot.
  232. # Example:
  233. # Alias /webpath /full/filesystem/path
  234. #
  235. # If you include a trailing / on /webpath then the server will
  236. # require it to be present in the URL. You will also likely
  237. # need to provide a <Directory> section to allow access to
  238. # the filesystem path.
  239.  
  240. #
  241. # ScriptAlias: This controls which directories contain server scripts.
  242. # ScriptAliases are essentially the same as Aliases, except that
  243. # documents in the target directory are treated as applications and
  244. # run by the server when requested rather than as documents sent to the
  245. # client. The same rules about trailing "/" apply to ScriptAlias
  246. # directives as to Alias.
  247. #
  248. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  249.  
  250. </IfModule>
  251.  
  252. #
  253. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
  254. # CGI directory exists, if you have that configured.
  255. #
  256. <Directory "/var/www/cgi-bin">
  257. AllowOverride None
  258. Options None
  259. Require all granted
  260. </Directory>
  261.  
  262. <IfModule mime_module>
  263. #
  264. # TypesConfig points to the file containing the list of mappings from
  265. # filename extension to MIME-type.
  266. #
  267. TypesConfig /etc/mime.types
  268.  
  269. #
  270. # AddType allows you to add to or override the MIME configuration
  271. # file specified in TypesConfig for specific file types.
  272. #
  273. #AddType application/x-gzip .tgz
  274. #
  275. # AddEncoding allows you to have certain browsers uncompress
  276. # information on the fly. Note: Not all browsers support this.
  277. #
  278. #AddEncoding x-compress .Z
  279. #AddEncoding x-gzip .gz .tgz
  280. #
  281. # If the AddEncoding directives above are commented-out, then you
  282. # probably should define those extensions to indicate media types:
  283. #
  284. AddType application/x-compress .Z
  285. AddType application/x-gzip .gz .tgz
  286.  
  287. #
  288. # AddHandler allows you to map certain file extensions to "handlers":
  289. # actions unrelated to filetype. These can be either built into the server
  290. # or added with the Action directive (see below)
  291. #
  292. # To use CGI scripts outside of ScriptAliased directories:
  293. # (You will also need to add "ExecCGI" to the "Options" directive.)
  294. #
  295. #AddHandler cgi-script .cgi
  296.  
  297. # For type maps (negotiated resources):
  298. #AddHandler type-map var
  299.  
  300. #
  301. # Filters allow you to process content before it is sent to the client.
  302. #
  303. # To parse .shtml files for server-side includes (SSI):
  304. # (You will also need to add "Includes" to the "Options" directive.)
  305. #
  306. AddType text/html .shtml
  307. AddOutputFilter INCLUDES .shtml
  308. </IfModule>
  309.  
  310. #
  311. # Specify a default charset for all content served; this enables
  312. # interpretation of all content as UTF-8 by default. To use the
  313. # default browser choice (ISO-8859-1), or to allow the META tags
  314. # in HTML content to override this choice, comment out this
  315. # directive:
  316. #
  317. AddDefaultCharset UTF-8
  318.  
  319. <IfModule mime_magic_module>
  320. #
  321. # The mod_mime_magic module allows the server to use various hints from the
  322. # contents of the file itself to determine its type. The MIMEMagicFile
  323. # directive tells the module where the hint definitions are located.
  324. #
  325. MIMEMagicFile conf/magic
  326. </IfModule>
  327.  
  328. #
  329. # Customizable error responses come in three flavors:
  330. # 1) plain text 2) local redirects 3) external redirects
  331. #
  332. # Some examples:
  333. #ErrorDocument 500 "The server made a boo boo."
  334. #ErrorDocument 404 /missing.html
  335. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  336. #ErrorDocument 402 http://www.example.com/subscription_info.html
  337. #
  338.  
  339. #
  340. # EnableMMAP and EnableSendfile: On systems that support it,
  341. # memory-mapping or the sendfile syscall may be used to deliver
  342. # files. This usually improves server performance, but must
  343. # be turned off when serving from networked-mounted
  344. # filesystems or if support for these functions is otherwise
  345. # broken on your system.
  346. # Defaults if commented: EnableMMAP On, EnableSendfile Off
  347. #
  348. #EnableMMAP off
  349. EnableSendfile on
  350.  
  351. # Supplemental configuration
  352. #
  353. # Load config files in the "/etc/httpd/conf.d" directory, if any.
  354. IncludeOptional conf.d/*.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement