Want more features on Pastebin? Sign Up, it's FREE!
Guest

httpd.conf

By: a guest on May 27th, 2012  |  syntax: None  |  size: 16.92 KB  |  views: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.2> for detailed information.
  5. # In particular, see
  6. # <URL:http://httpd.apache.org/docs/2.2/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 "/var/log/foo_log"
  17. # with ServerRoot set to "/usr/local" will be interpreted by the
  18. # server as "/usr/local//var/log/foo_log".
  19.  
  20. #
  21. # ServerRoot: The top of the directory tree under which the server's
  22. # configuration, error, and log files are kept.
  23. #
  24. # Do not add a slash at the end of the directory path.  If you point
  25. # ServerRoot at a non-local disk, be sure to point the LockFile directive
  26. # at a local disk.  If you wish to share the same ServerRoot for multiple
  27. # httpd daemons, you will need to change at least LockFile and PidFile.
  28. #
  29. ServerRoot "/usr/local"
  30.  
  31. #
  32. # Listen: Allows you to bind Apache to specific IP addresses and/or
  33. # ports, instead of the default. See also the <VirtualHost>
  34. # directive.
  35. #
  36. # Change this to Listen on specific IP addresses as shown below to
  37. # prevent Apache from glomming onto all bound IP addresses.
  38. #
  39. #Listen 12.34.56.78:80
  40. Listen 80
  41.  
  42. #
  43. # Dynamic Shared Object (DSO) Support
  44. #
  45. # To be able to use the functionality of a module which was built as a DSO you
  46. # have to place corresponding `LoadModule' lines at this location so the
  47. # directives contained in it are actually available _before_ they are used.
  48. # Statically compiled modules (those listed by `httpd -l') do not need
  49. # to be loaded here.
  50. #
  51. # Example:
  52. # LoadModule foo_module modules/mod_foo.so
  53. #
  54. LoadModule authn_file_module libexec/apache22/mod_authn_file.so
  55. LoadModule authn_dbm_module libexec/apache22/mod_authn_dbm.so
  56. LoadModule authn_anon_module libexec/apache22/mod_authn_anon.so
  57. LoadModule authn_default_module libexec/apache22/mod_authn_default.so
  58. LoadModule authn_alias_module libexec/apache22/mod_authn_alias.so
  59. LoadModule authz_host_module libexec/apache22/mod_authz_host.so
  60. LoadModule authz_groupfile_module libexec/apache22/mod_authz_groupfile.so
  61. LoadModule authz_user_module libexec/apache22/mod_authz_user.so
  62. LoadModule authz_dbm_module libexec/apache22/mod_authz_dbm.so
  63. LoadModule authz_owner_module libexec/apache22/mod_authz_owner.so
  64. LoadModule authz_default_module libexec/apache22/mod_authz_default.so
  65. LoadModule auth_basic_module libexec/apache22/mod_auth_basic.so
  66. LoadModule auth_digest_module libexec/apache22/mod_auth_digest.so
  67. LoadModule file_cache_module libexec/apache22/mod_file_cache.so
  68. LoadModule cache_module libexec/apache22/mod_cache.so
  69. LoadModule disk_cache_module libexec/apache22/mod_disk_cache.so
  70. LoadModule dumpio_module libexec/apache22/mod_dumpio.so
  71. LoadModule reqtimeout_module libexec/apache22/mod_reqtimeout.so
  72. LoadModule include_module libexec/apache22/mod_include.so
  73. LoadModule filter_module libexec/apache22/mod_filter.so
  74. LoadModule charset_lite_module libexec/apache22/mod_charset_lite.so
  75. LoadModule deflate_module libexec/apache22/mod_deflate.so
  76. LoadModule log_config_module libexec/apache22/mod_log_config.so
  77. LoadModule logio_module libexec/apache22/mod_logio.so
  78. LoadModule env_module libexec/apache22/mod_env.so
  79. LoadModule mime_magic_module libexec/apache22/mod_mime_magic.so
  80. LoadModule cern_meta_module libexec/apache22/mod_cern_meta.so
  81. LoadModule expires_module libexec/apache22/mod_expires.so
  82. LoadModule headers_module libexec/apache22/mod_headers.so
  83. LoadModule usertrack_module libexec/apache22/mod_usertrack.so
  84. LoadModule unique_id_module libexec/apache22/mod_unique_id.so
  85. LoadModule setenvif_module libexec/apache22/mod_setenvif.so
  86. LoadModule version_module libexec/apache22/mod_version.so
  87. LoadModule ssl_module libexec/apache22/mod_ssl.so
  88. LoadModule mime_module libexec/apache22/mod_mime.so
  89. LoadModule dav_module libexec/apache22/mod_dav.so
  90. LoadModule status_module libexec/apache22/mod_status.so
  91. LoadModule autoindex_module libexec/apache22/mod_autoindex.so
  92. LoadModule asis_module libexec/apache22/mod_asis.so
  93. LoadModule info_module libexec/apache22/mod_info.so
  94. LoadModule cgi_module libexec/apache22/mod_cgi.so
  95. LoadModule dav_fs_module libexec/apache22/mod_dav_fs.so
  96. LoadModule vhost_alias_module libexec/apache22/mod_vhost_alias.so
  97. LoadModule negotiation_module libexec/apache22/mod_negotiation.so
  98. LoadModule dir_module libexec/apache22/mod_dir.so
  99. LoadModule imagemap_module libexec/apache22/mod_imagemap.so
  100. LoadModule actions_module libexec/apache22/mod_actions.so
  101. LoadModule speling_module libexec/apache22/mod_speling.so
  102. LoadModule userdir_module libexec/apache22/mod_userdir.so
  103. LoadModule alias_module libexec/apache22/mod_alias.so
  104. LoadModule rewrite_module libexec/apache22/mod_rewrite.so
  105.  
  106. <IfModule dir_module>
  107.     DirectoryIndex index.html index.php index.htm
  108. </IfModule>
  109.  
  110. AddType application/x-httpd-php .php
  111.  
  112. <IfModule !mpm_netware_module>
  113. <IfModule !mpm_winnt_module>
  114. #
  115. # If you wish httpd to run as a different user or group, you must run
  116. # httpd as root initially and it will switch.  
  117. #
  118. # User/Group: The name (or #number) of the user/group to run httpd as.
  119. # It is usually good practice to create a dedicated user and group for
  120. # running httpd, as with most system services.
  121. #
  122. User www
  123. Group www
  124.  
  125. </IfModule>
  126. </IfModule>
  127.  
  128. # 'Main' server configuration
  129. #
  130. # The directives in this section set up the values used by the 'main'
  131. # server, which responds to any requests that aren't handled by a
  132. # <VirtualHost> definition.  These values also provide defaults for
  133. # any <VirtualHost> containers you may define later in the file.
  134. #
  135. # All of these directives may appear inside <VirtualHost> containers,
  136. # in which case these default settings will be overridden for the
  137. # virtual host being defined.
  138. #
  139.  
  140. #
  141. # ServerAdmin: Your address, where problems with the server should be
  142. # e-mailed.  This address appears on some server-generated pages, such
  143. # as error documents.  e.g. admin@your-domain.com
  144. #
  145. ServerAdmin you@example.com
  146.  
  147. #
  148. # ServerName gives the name and port that the server uses to identify itself.
  149. # This can often be determined automatically, but we recommend you specify
  150. # it explicitly to prevent problems during startup.
  151. #
  152. # If your host doesn't have a registered DNS name, enter its IP address here.
  153. #
  154. #ServerName www.example.com:80
  155.  
  156. #
  157. # DocumentRoot: The directory out of which you will serve your
  158. # documents. By default, all requests are taken from this directory, but
  159. # symbolic links and aliases may be used to point to other locations.
  160. #
  161. DocumentRoot "/usr/local/www/apache22/data"
  162.  
  163. #
  164. # Each directory to which Apache has access can be configured with respect
  165. # to which services and features are allowed and/or disabled in that
  166. # directory (and its subdirectories).
  167. #
  168. # First, we configure the "default" to be a very restrictive set of
  169. # features.  
  170. #
  171. <Directory />
  172.     AllowOverride None
  173.     Order deny,allow
  174.     Deny from all
  175. </Directory>
  176.  
  177. #
  178. # Note that from this point forward you must specifically allow
  179. # particular features to be enabled - so if something's not working as
  180. # you might expect, make sure that you have specifically enabled it
  181. # below.
  182. #
  183.  
  184. #
  185. # This should be changed to whatever you set DocumentRoot to.
  186. #
  187. <Directory "/usr/local/www/apache22/data">
  188.     #
  189.     # Possible values for the Options directive are "None", "All",
  190.     # or any combination of:
  191.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  192.     #
  193.     # Note that "MultiViews" must be named *explicitly* --- "Options All"
  194.     # doesn't give it to you.
  195.     #
  196.     # The Options directive is both complicated and important.  Please see
  197.     # http://httpd.apache.org/docs/2.2/mod/core.html#options
  198.     # for more information.
  199.     #
  200.     Options Indexes FollowSymLinks
  201.  
  202.     #
  203.     # AllowOverride controls what directives may be placed in .htaccess files.
  204.     # It can be "All", "None", or any combination of the keywords:
  205.     #   Options FileInfo AuthConfig Limit
  206.     #
  207.     AllowOverride None
  208.  
  209.     #
  210.     # Controls who can get stuff from this server.
  211.     #
  212.     Order allow,deny
  213.     Allow from all
  214.  
  215. </Directory>
  216.  
  217. #
  218. # DirectoryIndex: sets the file that Apache will serve if a directory
  219. # is requested.
  220. #
  221. <IfModule dir_module>
  222.     DirectoryIndex index.html
  223. </IfModule>
  224.  
  225. #
  226. # The following lines prevent .htaccess and .htpasswd files from being
  227. # viewed by Web clients.
  228. #
  229. <FilesMatch "^\.ht">
  230.     Order allow,deny
  231.     Deny from all
  232.     Satisfy All
  233. </FilesMatch>
  234.  
  235. #
  236. # ErrorLog: The location of the error log file.
  237. # If you do not specify an ErrorLog directive within a <VirtualHost>
  238. # container, error messages relating to that virtual host will be
  239. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  240. # container, that host's errors will be logged there and not here.
  241. #
  242. ErrorLog "/var/log/httpd-error.log"
  243.  
  244. #
  245. # LogLevel: Control the number of messages logged to the error_log.
  246. # Possible values include: debug, info, notice, warn, error, crit,
  247. # alert, emerg.
  248. #
  249. LogLevel warn
  250.  
  251. <IfModule log_config_module>
  252.     #
  253.     # The following directives define some format nicknames for use with
  254.     # a CustomLog directive (see below).
  255.     #
  256.     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  257.     LogFormat "%h %l %u %t \"%r\" %>s %b" common
  258.  
  259.     <IfModule logio_module>
  260.       # You need to enable mod_logio.c to use %I and %O
  261.       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  262.     </IfModule>
  263.  
  264.     #
  265.     # The location and format of the access logfile (Common Logfile Format).
  266.     # If you do not define any access logfiles within a <VirtualHost>
  267.     # container, they will be logged here.  Contrariwise, if you *do*
  268.     # define per-<VirtualHost> access logfiles, transactions will be
  269.     # logged therein and *not* in this file.
  270.     #
  271.     #CustomLog "/var/log/httpd-access.log" common
  272.  
  273.     #
  274.     # If you prefer a logfile with access, agent, and referer information
  275.     # (Combined Logfile Format) you can use the following directive.
  276.     #
  277.     CustomLog "/var/log/httpd-access.log" combined
  278. </IfModule>
  279.  
  280. <IfModule alias_module>
  281.     #
  282.     # Redirect: Allows you to tell clients about documents that used to
  283.     # exist in your server's namespace, but do not anymore. The client
  284.     # will make a new request for the document at its new location.
  285.     # Example:
  286.     # Redirect permanent /foo http://www.example.com/bar
  287.  
  288.     #
  289.     # Alias: Maps web paths into filesystem paths and is used to
  290.     # access content that does not live under the DocumentRoot.
  291.     # Example:
  292.     # Alias /webpath /full/filesystem/path
  293.     #
  294.     # If you include a trailing / on /webpath then the server will
  295.     # require it to be present in the URL.  You will also likely
  296.     # need to provide a <Directory> section to allow access to
  297.     # the filesystem path.
  298.  
  299.     #
  300.     # ScriptAlias: This controls which directories contain server scripts.
  301.     # ScriptAliases are essentially the same as Aliases, except that
  302.     # documents in the target directory are treated as applications and
  303.     # run by the server when requested rather than as documents sent to the
  304.     # client.  The same rules about trailing "/" apply to ScriptAlias
  305.     # directives as to Alias.
  306.     #
  307.     ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
  308.  
  309. </IfModule>
  310.  
  311. <IfModule cgid_module>
  312.     #
  313.     # ScriptSock: On threaded servers, designate the path to the UNIX
  314.     # socket used to communicate with the CGI daemon of mod_cgid.
  315.     #
  316.     #Scriptsock /var/run/cgisock
  317. </IfModule>
  318.  
  319. #
  320. # "/usr/local/www/apache22/cgi-bin" should be changed to whatever your ScriptAliased
  321. # CGI directory exists, if you have that configured.
  322. #
  323. <Directory "/usr/local/www/apache22/cgi-bin">
  324.     AllowOverride None
  325.     Options None
  326.     Order allow,deny
  327.     Allow from all
  328. </Directory>
  329.  
  330. #
  331. # DefaultType: the default MIME type the server will use for a document
  332. # if it cannot otherwise determine one, such as from filename extensions.
  333. # If your server contains mostly text or HTML documents, "text/plain" is
  334. # a good value.  If most of your content is binary, such as applications
  335. # or images, you may want to use "application/octet-stream" instead to
  336. # keep browsers from trying to display binary files as though they are
  337. # text.
  338. #
  339. DefaultType text/plain
  340.  
  341. <IfModule mime_module>
  342.     #
  343.     # TypesConfig points to the file containing the list of mappings from
  344.     # filename extension to MIME-type.
  345.     #
  346.     TypesConfig etc/apache22/mime.types
  347.  
  348.     #
  349.     # AddType allows you to add to or override the MIME configuration
  350.     # file specified in TypesConfig for specific file types.
  351.     #
  352.     #AddType application/x-gzip .tgz
  353.     #
  354.     # AddEncoding allows you to have certain browsers uncompress
  355.     # information on the fly. Note: Not all browsers support this.
  356.     #
  357.     #AddEncoding x-compress .Z
  358.     #AddEncoding x-gzip .gz .tgz
  359.     #
  360.     # If the AddEncoding directives above are commented-out, then you
  361.     # probably should define those extensions to indicate media types:
  362.     #
  363.     AddType application/x-compress .Z
  364.     AddType application/x-gzip .gz .tgz
  365.  
  366.     #
  367.     # AddHandler allows you to map certain file extensions to "handlers":
  368.     # actions unrelated to filetype. These can be either built into the server
  369.     # or added with the Action directive (see below)
  370.     #
  371.     # To use CGI scripts outside of ScriptAliased directories:
  372.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  373.     #
  374.     #AddHandler cgi-script .cgi
  375.  
  376.     # For type maps (negotiated resources):
  377.     #AddHandler type-map var
  378.  
  379.     #
  380.     # Filters allow you to process content before it is sent to the client.
  381.     #
  382.     # To parse .shtml files for server-side includes (SSI):
  383.     # (You will also need to add "Includes" to the "Options" directive.)
  384.     #
  385.     #AddType text/html .shtml
  386.     #AddOutputFilter INCLUDES .shtml
  387. </IfModule>
  388.  
  389. #
  390. # The mod_mime_magic module allows the server to use various hints from the
  391. # contents of the file itself to determine its type.  The MIMEMagicFile
  392. # directive tells the module where the hint definitions are located.
  393. #
  394. #MIMEMagicFile etc/apache22/magic
  395.  
  396. #
  397. # Customizable error responses come in three flavors:
  398. # 1) plain text 2) local redirects 3) external redirects
  399. #
  400. # Some examples:
  401. #ErrorDocument 500 "The server made a boo boo."
  402. #ErrorDocument 404 /missing.html
  403. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  404. #ErrorDocument 402 http://www.example.com/subscription_info.html
  405. #
  406.  
  407. #
  408. # MaxRanges: Maximum number of Ranges in a request before
  409. # returning the entire resource, or 0 for unlimited
  410. # Default setting is to accept 200 Ranges
  411. #MaxRanges 0
  412.  
  413. #
  414. # EnableMMAP and EnableSendfile: On systems that support it,
  415. # memory-mapping or the sendfile syscall is used to deliver
  416. # files.  This usually improves server performance, but must
  417. # be turned off when serving from networked-mounted
  418. # filesystems or if support for these functions is otherwise
  419. # broken on your system.
  420. #
  421. #EnableMMAP off
  422. #EnableSendfile off
  423.  
  424. # Supplemental configuration
  425. #
  426. # The configuration files in the etc/apache22/extra/ directory can be
  427. # included to add extra features or to modify the default configuration of
  428. # the server, or you may simply copy their contents here and change as
  429. # necessary.
  430.  
  431. # Server-pool management (MPM specific)
  432. #Include etc/apache22/extra/httpd-mpm.conf
  433.  
  434. # Multi-language error messages
  435. #Include etc/apache22/extra/httpd-multilang-errordoc.conf
  436.  
  437. # Fancy directory listings
  438. #Include etc/apache22/extra/httpd-autoindex.conf
  439.  
  440. # Language settings
  441. #Include etc/apache22/extra/httpd-languages.conf
  442.  
  443. # User home directories
  444. #Include etc/apache22/extra/httpd-userdir.conf
  445.  
  446. # Real-time info on requests and configuration
  447. #Include etc/apache22/extra/httpd-info.conf
  448.  
  449. # Virtual hosts
  450. #Include etc/apache22/extra/httpd-vhosts.conf
  451.  
  452. # Local access to the Apache HTTP Server Manual
  453. #Include etc/apache22/extra/httpd-manual.conf
  454.  
  455. # Distributed authoring and versioning (WebDAV)
  456. #Include etc/apache22/extra/httpd-dav.conf
  457.  
  458. # Various default settings
  459. #Include etc/apache22/extra/httpd-default.conf
  460.  
  461. # Secure (SSL/TLS) connections
  462. #Include etc/apache22/extra/httpd-ssl.conf
  463. #
  464. # Note: The following must must be present to support
  465. #       starting without SSL on platforms with no /dev/random equivalent
  466. #       but a statically compiled-in mod_ssl.
  467. #
  468. <IfModule ssl_module>
  469. SSLRandomSeed startup builtin
  470. SSLRandomSeed connect builtin
  471. </IfModule>
  472.  
  473. Include etc/apache22/Includes/*.conf
clone this paste RAW Paste Data