Advertisement
Guest User

httpd.conf

a guest
Jan 25th, 2013
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.29 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 '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 point the LockFile directive
  27. # at a local disk. If you wish to share the same ServerRoot for multiple
  28. # httpd daemons, you will need to change at least LockFile and PidFile.
  29. #
  30. ServerRoot "/usr/local"
  31.  
  32. #
  33. # Listen: Allows you to bind Apache to specific IP addresses and/or
  34. # ports, instead of the default. See also the <VirtualHost>
  35. # directive.
  36. #
  37. # Change this to Listen on specific IP addresses as shown below to
  38. # prevent Apache from glomming onto all bound IP addresses.
  39. #
  40. #Listen 12.34.56.78:80
  41. Listen 80
  42.  
  43. #
  44. # Dynamic Shared Object (DSO) Support
  45. #
  46. # To be able to use the functionality of a module which was built as a DSO you
  47. # have to place corresponding `LoadModule' lines at this location so the
  48. # directives contained in it are actually available _before_ they are used.
  49. # Statically compiled modules (those listed by `httpd -l') do not need
  50. # to be loaded here.
  51. #
  52. # Example:
  53. # LoadModule foo_module modules/mod_foo.so
  54. #
  55. LoadModule authn_file_module libexec/apache22/mod_authn_file.so
  56. LoadModule authn_dbm_module libexec/apache22/mod_authn_dbm.so
  57. LoadModule authn_anon_module libexec/apache22/mod_authn_anon.so
  58. LoadModule authn_default_module libexec/apache22/mod_authn_default.so
  59. LoadModule authn_alias_module libexec/apache22/mod_authn_alias.so
  60. LoadModule authz_host_module libexec/apache22/mod_authz_host.so
  61. LoadModule authz_groupfile_module libexec/apache22/mod_authz_groupfile.so
  62. LoadModule authz_user_module libexec/apache22/mod_authz_user.so
  63. LoadModule authz_dbm_module libexec/apache22/mod_authz_dbm.so
  64. LoadModule authz_owner_module libexec/apache22/mod_authz_owner.so
  65. LoadModule authz_default_module libexec/apache22/mod_authz_default.so
  66. LoadModule auth_basic_module libexec/apache22/mod_auth_basic.so
  67. LoadModule auth_digest_module libexec/apache22/mod_auth_digest.so
  68. LoadModule file_cache_module libexec/apache22/mod_file_cache.so
  69. LoadModule cache_module libexec/apache22/mod_cache.so
  70. LoadModule disk_cache_module libexec/apache22/mod_disk_cache.so
  71. LoadModule dumpio_module libexec/apache22/mod_dumpio.so
  72. LoadModule reqtimeout_module libexec/apache22/mod_reqtimeout.so
  73. LoadModule include_module libexec/apache22/mod_include.so
  74. LoadModule filter_module libexec/apache22/mod_filter.so
  75. LoadModule charset_lite_module libexec/apache22/mod_charset_lite.so
  76. LoadModule deflate_module libexec/apache22/mod_deflate.so
  77. LoadModule log_config_module libexec/apache22/mod_log_config.so
  78. LoadModule logio_module libexec/apache22/mod_logio.so
  79. LoadModule env_module libexec/apache22/mod_env.so
  80. LoadModule mime_magic_module libexec/apache22/mod_mime_magic.so
  81. LoadModule cern_meta_module libexec/apache22/mod_cern_meta.so
  82. LoadModule expires_module libexec/apache22/mod_expires.so
  83. LoadModule headers_module libexec/apache22/mod_headers.so
  84. LoadModule usertrack_module libexec/apache22/mod_usertrack.so
  85. LoadModule unique_id_module libexec/apache22/mod_unique_id.so
  86. LoadModule setenvif_module libexec/apache22/mod_setenvif.so
  87. LoadModule version_module libexec/apache22/mod_version.so
  88. LoadModule ssl_module libexec/apache22/mod_ssl.so
  89. LoadModule mime_module libexec/apache22/mod_mime.so
  90. LoadModule dav_module libexec/apache22/mod_dav.so
  91. LoadModule status_module libexec/apache22/mod_status.so
  92. LoadModule autoindex_module libexec/apache22/mod_autoindex.so
  93. LoadModule asis_module libexec/apache22/mod_asis.so
  94. LoadModule info_module libexec/apache22/mod_info.so
  95. LoadModule cgi_module libexec/apache22/mod_cgi.so
  96. LoadModule dav_fs_module libexec/apache22/mod_dav_fs.so
  97. LoadModule vhost_alias_module libexec/apache22/mod_vhost_alias.so
  98. LoadModule negotiation_module libexec/apache22/mod_negotiation.so
  99. LoadModule dir_module libexec/apache22/mod_dir.so
  100. LoadModule imagemap_module libexec/apache22/mod_imagemap.so
  101. LoadModule actions_module libexec/apache22/mod_actions.so
  102. LoadModule speling_module libexec/apache22/mod_speling.so
  103. LoadModule userdir_module libexec/apache22/mod_userdir.so
  104. LoadModule alias_module libexec/apache22/mod_alias.so
  105. LoadModule rewrite_module libexec/apache22/mod_rewrite.so
  106. #LoadModule php5_module libexec/apache22/libphp5.so
  107. LoadModule fcgid_module libexec/apache22/mod_fcgid.so
  108. <IfModule mod_fcgid.c>
  109. AddHandler fcgid-script .fcgi
  110. FCGIWrapper /usr/local/bin/php-cgi .php
  111. </IfModule>
  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. <Directory />
  165. AllowOverride None
  166. Order deny,allow
  167. Deny from all
  168. </Directory>
  169.  
  170. #
  171. # Note that from this point forward you must specifically allow
  172. # particular features to be enabled - so if something's not working as
  173. # you might expect, make sure that you have specifically enabled it
  174. # below.
  175. #
  176.  
  177. #
  178. # This should be changed to whatever you set DocumentRoot to.
  179. #
  180. <Directory "/usr/local/www/apache22/data">
  181. Options Indexes FollowSymLinks
  182. AllowOverride None
  183. Order allow,deny
  184. SetHandler fcgid-script
  185. FCGIWrapper /usr/local/bin/php-cgi .php
  186. Options ExecCGI
  187. Allow from all
  188. </Directory>
  189.  
  190. #
  191. # DirectoryIndex: sets the file that Apache will serve if a directory
  192. # is requested.
  193. #
  194. <IfModule dir_module>
  195. DirectoryIndex index.php index.html
  196. </IfModule>
  197.  
  198. #
  199. # The following lines prevent .htaccess and .htpasswd files from being
  200. # viewed by Web clients.
  201. #
  202. <FilesMatch "^\.ht">
  203. Order allow,deny
  204. Deny from all
  205. Satisfy All
  206. </FilesMatch>
  207.  
  208. #
  209. # ErrorLog: The location of the error log file.
  210. # If you do not specify an ErrorLog directive within a <VirtualHost>
  211. # container, error messages relating to that virtual host will be
  212. # logged here. If you *do* define an error logfile for a <VirtualHost>
  213. # container, that host's errors will be logged there and not here.
  214. #
  215. ErrorLog "/var/log/httpd-error.log"
  216.  
  217. #
  218. # LogLevel: Control the number of messages logged to the error_log.
  219. # Possible values include: debug, info, notice, warn, error, crit,
  220. # alert, emerg.
  221. #
  222. LogLevel warn
  223.  
  224. <IfModule log_config_module>
  225. #
  226. # The following directives define some format nicknames for use with
  227. # a CustomLog directive (see below).
  228. #
  229. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  230. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  231.  
  232. <IfModule logio_module>
  233. # You need to enable mod_logio.c to use %I and %O
  234. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  235. </IfModule>
  236.  
  237. #
  238. # The location and format of the access logfile (Common Logfile Format).
  239. # If you do not define any access logfiles within a <VirtualHost>
  240. # container, they will be logged here. Contrariwise, if you *do*
  241. # define per-<VirtualHost> access logfiles, transactions will be
  242. # logged therein and *not* in this file.
  243. #
  244. #CustomLog "/var/log/httpd-access.log" common
  245.  
  246. #
  247. # If you prefer a logfile with access, agent, and referer information
  248. # (Combined Logfile Format) you can use the following directive.
  249. #
  250. CustomLog "/var/log/httpd-access.log" combined
  251. </IfModule>
  252.  
  253. <IfModule alias_module>
  254. #
  255. # Redirect: Allows you to tell clients about documents that used to
  256. # exist in your server's namespace, but do not anymore. The client
  257. # will make a new request for the document at its new location.
  258. # Example:
  259. # Redirect permanent /foo http://www.example.com/bar
  260.  
  261. #
  262. # Alias: Maps web paths into filesystem paths and is used to
  263. # access content that does not live under the DocumentRoot.
  264. # Example:
  265. # Alias /webpath /full/filesystem/path
  266. #
  267. # If you include a trailing / on /webpath then the server will
  268. # require it to be present in the URL. You will also likely
  269. # need to provide a <Directory> section to allow access to
  270. # the filesystem path.
  271.  
  272. #
  273. # ScriptAlias: This controls which directories contain server scripts.
  274. # ScriptAliases are essentially the same as Aliases, except that
  275. # documents in the target directory are treated as applications and
  276. # run by the server when requested rather than as documents sent to the
  277. # client. The same rules about trailing "/" apply to ScriptAlias
  278. # directives as to Alias.
  279. #
  280. ScriptAlias /cgi-bin/ "/usr/local/www/apache22/cgi-bin/"
  281.  
  282. </IfModule>
  283.  
  284. <IfModule cgid_module>
  285. #
  286. # ScriptSock: On threaded servers, designate the path to the UNIX
  287. # socket used to communicate with the CGI daemon of mod_cgid.
  288. #
  289. #Scriptsock /var/run/cgisock
  290. </IfModule>
  291.  
  292. #
  293. # "/usr/local/www/apache22/cgi-bin" should be changed to whatever your ScriptAliased
  294. # CGI directory exists, if you have that configured.
  295. #
  296. <Directory "/usr/local/www/apache22/cgi-bin">
  297. AllowOverride None
  298. Options None
  299. Order allow,deny
  300. Allow from all
  301. </Directory>
  302.  
  303. #
  304. # DefaultType: the default MIME type the server will use for a document
  305. # if it cannot otherwise determine one, such as from filename extensions.
  306. # If your server contains mostly text or HTML documents, "text/plain" is
  307. # a good value. If most of your content is binary, such as applications
  308. # or images, you may want to use "application/octet-stream" instead to
  309. # keep browsers from trying to display binary files as though they are
  310. # text.
  311. #
  312. DefaultType text/plain
  313.  
  314. <IfModule mime_module>
  315. #
  316. # TypesConfig points to the file containing the list of mappings from
  317. # filename extension to MIME-type.
  318. #
  319. TypesConfig etc/apache22/mime.types
  320.  
  321. #
  322. # AddType allows you to add to or override the MIME configuration
  323. # file specified in TypesConfig for specific file types.
  324. #
  325. #AddType application/x-gzip .tgz
  326. #
  327. # AddEncoding allows you to have certain browsers uncompress
  328. # information on the fly. Note: Not all browsers support this.
  329. #
  330. #AddEncoding x-compress .Z
  331. #AddEncoding x-gzip .gz .tgz
  332. #
  333. # If the AddEncoding directives above are commented-out, then you
  334. # probably should define those extensions to indicate media types:
  335. #
  336. AddType application/x-compress .Z
  337. AddType application/x-gzip .gz .tgz
  338.  
  339. #
  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. # MaxRanges: Maximum number of Ranges in a request before
  382. # returning the entire resource, or one of the special
  383. # values 'default', 'none' or 'unlimited'.
  384. # Default setting is to accept 200 Ranges.
  385. #MaxRanges unlimited
  386.  
  387. #
  388. # EnableMMAP and EnableSendfile: On systems that support it,
  389. # memory-mapping or the sendfile syscall is used to deliver
  390. # files. This usually improves server performance, but must
  391. # be turned off when serving from networked-mounted
  392. # filesystems or if support for these functions is otherwise
  393. # broken on your system.
  394. #
  395. #EnableMMAP off
  396. #EnableSendfile off
  397.  
  398. # Supplemental configuration
  399. #
  400. # The configuration files in the etc/apache22/extra/ directory can be
  401. # included to add extra features or to modify the default configuration of
  402. # the server, or you may simply copy their contents here and change as
  403. # necessary.
  404.  
  405. # Server-pool management (MPM specific)
  406. #Include etc/apache22/extra/httpd-mpm.conf
  407.  
  408. # Multi-language error messages
  409. #Include etc/apache22/extra/httpd-multilang-errordoc.conf
  410.  
  411. # Fancy directory listings
  412. #Include etc/apache22/extra/httpd-autoindex.conf
  413.  
  414. # Language settings
  415. #Include etc/apache22/extra/httpd-languages.conf
  416.  
  417. # User home directories
  418. #Include etc/apache22/extra/httpd-userdir.conf
  419.  
  420. # Real-time info on requests and configuration
  421. #Include etc/apache22/extra/httpd-info.conf
  422.  
  423. # Virtual hosts
  424. #Include etc/apache22/extra/httpd-vhosts.conf
  425.  
  426. # Local access to the Apache HTTP Server Manual
  427. #Include etc/apache22/extra/httpd-manual.conf
  428.  
  429. # Distributed authoring and versioning (WebDAV)
  430. #Include etc/apache22/extra/httpd-dav.conf
  431.  
  432. # Various default settings
  433. #Include etc/apache22/extra/httpd-default.conf
  434.  
  435. # Secure (SSL/TLS) connections
  436. #Include etc/apache22/extra/httpd-ssl.conf
  437. #
  438. # Note: The following must must be present to support
  439. # starting without SSL on platforms with no /dev/random equivalent
  440. # but a statically compiled-in mod_ssl.
  441. #
  442. <IfModule ssl_module>
  443. SSLRandomSeed startup builtin
  444. SSLRandomSeed connect builtin
  445. </IfModule>
  446.  
  447. Include etc/apache22/Includes/*.conf
  448. AddType application/x-httpd-php .php
  449. AddType application/x-httpd-php-source .phps
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement