Advertisement
Guest User

httpd.conf

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