Advertisement
Guest User

httpd

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