Advertisement
Guest User

Untitled

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