Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

my apache config

By: mennanov on Jan 11th, 2012  |  syntax: None  |  size: 34.50 KB  |  views: 95  |  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. # The configuration directives are grouped into three basic sections:
  14. #  1. Directives that control the operation of the Apache server process as a
  15. #     whole (the 'global environment').
  16. #  2. Directives that define the parameters of the 'main' or 'default' server,
  17. #     which responds to requests that aren't handled by a virtual host.
  18. #     These directives also provide default values for the settings
  19. #     of all virtual hosts.
  20. #  3. Settings for virtual hosts, which allow Web requests to be sent to
  21. #     different IP addresses or hostnames and have them handled by the
  22. #     same Apache server process.
  23. #
  24. # Configuration and logfile names: If the filenames you specify for many
  25. # of the server's control files begin with "/" (or "drive:/" for Win32), the
  26. # server will use that explicit path.  If the filenames do *not* begin
  27. # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
  28. # with ServerRoot set to "/etc/httpd" will be interpreted by the
  29. # server as "/etc/httpd/logs/foo.log".
  30. #
  31.  
  32. ### Section 1: Global Environment
  33. #
  34. # The directives in this section affect the overall operation of Apache,
  35. # such as the number of concurrent requests it can handle or where it
  36. # can find its configuration files.
  37. #
  38.  
  39. #
  40. # Don't give away too much information about all the subcomponents
  41. # we are running.  Comment out this line if you don't mind remote sites
  42. # finding out what major optional modules you are running
  43. ServerTokens OS
  44.  
  45. #
  46. # ServerRoot: The top of the directory tree under which the server's
  47. # configuration, error, and log files are kept.
  48. #
  49. # NOTE!  If you intend to place this on an NFS (or otherwise network)
  50. # mounted filesystem then please read the LockFile documentation
  51. # (available at <URL:http://httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile>);
  52. # you will save yourself a lot of trouble.
  53. #
  54. # Do NOT add a slash at the end of the directory path.
  55. #
  56. ServerRoot "/etc/httpd"
  57.  
  58. #
  59. # PidFile: The file in which the server should record its process
  60. # identification number when it starts.  Note the PIDFILE variable in
  61. # /etc/sysconfig/httpd must be set appropriately if this location is
  62. # changed.
  63. #
  64. PidFile run/httpd.pid
  65.  
  66. #
  67. # Timeout: The number of seconds before receives and sends time out.
  68. #
  69. Timeout 60
  70.  
  71. #
  72. # KeepAlive: Whether or not to allow persistent connections (more than
  73. # one request per connection). Set to "Off" to deactivate.
  74. #
  75. KeepAlive Off
  76.  
  77. #
  78. # MaxKeepAliveRequests: The maximum number of requests to allow
  79. # during a persistent connection. Set to 0 to allow an unlimited amount.
  80. # We recommend you leave this number high, for maximum performance.
  81. #
  82. MaxKeepAliveRequests 100
  83.  
  84. #
  85. # KeepAliveTimeout: Number of seconds to wait for the next request from the
  86. # same client on the same connection.
  87. #
  88. KeepAliveTimeout 5
  89.  
  90. ##
  91. ## Server-Pool Size Regulation (MPM specific)
  92. ##
  93.  
  94. # prefork MPM
  95. # StartServers: number of server processes to start
  96. # MinSpareServers: minimum number of server processes which are kept spare
  97. # MaxSpareServers: maximum number of server processes which are kept spare
  98. # ServerLimit: maximum value for MaxClients for the lifetime of the server
  99. # MaxClients: maximum number of server processes allowed to start
  100. # MaxRequestsPerChild: maximum number of requests a server process serves
  101. <IfModule prefork.c>
  102. StartServers       8
  103. MinSpareServers    5
  104. MaxSpareServers   20
  105. ServerLimit      256
  106. MaxClients       256
  107. MaxRequestsPerChild  4000
  108. </IfModule>
  109.  
  110. # worker MPM
  111. # StartServers: initial number of server processes to start
  112. # MaxClients: maximum number of simultaneous client connections
  113. # MinSpareThreads: minimum number of worker threads which are kept spare
  114. # MaxSpareThreads: maximum number of worker threads which are kept spare
  115. # ThreadsPerChild: constant number of worker threads in each server process
  116. # MaxRequestsPerChild: maximum number of requests a server process serves
  117. <IfModule worker.c>
  118. StartServers         4
  119. MaxClients         300
  120. MinSpareThreads     25
  121. MaxSpareThreads     75
  122. ThreadsPerChild     25
  123. MaxRequestsPerChild  0
  124. </IfModule>
  125.  
  126. #
  127. # Listen: Allows you to bind Apache to specific IP addresses and/or
  128. # ports, instead of the default. See also the <VirtualHost>
  129. # directive.
  130. #
  131. # Change this to Listen on specific IP addresses as shown below to
  132. # prevent Apache from glomming onto all bound IP addresses.
  133. #
  134. #Listen 12.34.56.78:80
  135. Listen 80
  136.  
  137. #
  138. # Dynamic Shared Object (DSO) Support
  139. #
  140. # To be able to use the functionality of a module which was built as a DSO you
  141. # have to place corresponding `LoadModule' lines at this location so the
  142. # directives contained in it are actually available _before_ they are used.
  143. # Statically compiled modules (those listed by `httpd -l') do not need
  144. # to be loaded here.
  145. #
  146. # Example:
  147. # LoadModule foo_module modules/mod_foo.so
  148. #
  149. LoadModule auth_basic_module modules/mod_auth_basic.so
  150. LoadModule auth_digest_module modules/mod_auth_digest.so
  151. LoadModule authn_file_module modules/mod_authn_file.so
  152. LoadModule authn_alias_module modules/mod_authn_alias.so
  153. LoadModule authn_anon_module modules/mod_authn_anon.so
  154. LoadModule authn_dbm_module modules/mod_authn_dbm.so
  155. LoadModule authn_default_module modules/mod_authn_default.so
  156. LoadModule authz_host_module modules/mod_authz_host.so
  157. LoadModule authz_user_module modules/mod_authz_user.so
  158. LoadModule authz_owner_module modules/mod_authz_owner.so
  159. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  160. LoadModule authz_dbm_module modules/mod_authz_dbm.so
  161. LoadModule authz_default_module modules/mod_authz_default.so
  162. LoadModule authn_dbd_module modules/mod_authn_dbd.so
  163. LoadModule dbd_module modules/mod_dbd.so
  164. LoadModule ldap_module modules/mod_ldap.so
  165. LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
  166. LoadModule include_module modules/mod_include.so
  167. LoadModule log_config_module modules/mod_log_config.so
  168. LoadModule logio_module modules/mod_logio.so
  169. LoadModule env_module modules/mod_env.so
  170. LoadModule ext_filter_module modules/mod_ext_filter.so
  171. LoadModule mime_magic_module modules/mod_mime_magic.so
  172. LoadModule expires_module modules/mod_expires.so
  173. LoadModule deflate_module modules/mod_deflate.so
  174. LoadModule headers_module modules/mod_headers.so
  175. LoadModule usertrack_module modules/mod_usertrack.so
  176. LoadModule setenvif_module modules/mod_setenvif.so
  177. LoadModule mime_module modules/mod_mime.so
  178. LoadModule dav_module modules/mod_dav.so
  179. LoadModule status_module modules/mod_status.so
  180. LoadModule autoindex_module modules/mod_autoindex.so
  181. LoadModule info_module modules/mod_info.so
  182. LoadModule dav_fs_module modules/mod_dav_fs.so
  183. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  184. LoadModule negotiation_module modules/mod_negotiation.so
  185. LoadModule dir_module modules/mod_dir.so
  186. LoadModule actions_module modules/mod_actions.so
  187. LoadModule speling_module modules/mod_speling.so
  188. LoadModule userdir_module modules/mod_userdir.so
  189. LoadModule alias_module modules/mod_alias.so
  190. LoadModule substitute_module modules/mod_substitute.so
  191. LoadModule rewrite_module modules/mod_rewrite.so
  192. LoadModule proxy_module modules/mod_proxy.so
  193. LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
  194. LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
  195. LoadModule proxy_http_module modules/mod_proxy_http.so
  196. LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
  197. LoadModule proxy_connect_module modules/mod_proxy_connect.so
  198. LoadModule cache_module modules/mod_cache.so
  199. LoadModule suexec_module modules/mod_suexec.so
  200. LoadModule disk_cache_module modules/mod_disk_cache.so
  201. LoadModule cgi_module modules/mod_cgi.so
  202. LoadModule version_module modules/mod_version.so
  203.  
  204. #
  205. # The following modules are not loaded by default:
  206. #
  207. #LoadModule asis_module modules/mod_asis.so
  208. #LoadModule cern_meta_module modules/mod_cern_meta.so
  209. #LoadModule cgid_module modules/mod_cgid.so
  210. #LoadModule dumpio_module modules/mod_dumpio.so
  211. #LoadModule filter_module modules/mod_filter.so
  212. #LoadModule ident_module modules/mod_ident.so
  213. #LoadModule log_forensic_module modules/mod_log_forensic.so
  214. #LoadModule unique_id_module modules/mod_unique_id.so
  215. #
  216.  
  217. #
  218. # Load config files from the config directory "/etc/httpd/conf.d".
  219. #
  220. Include conf.d/*.conf
  221. Include conf.d/vhosts/*.conf
  222. #
  223. # ExtendedStatus controls whether Apache will generate "full" status
  224. # information (ExtendedStatus On) or just basic information (ExtendedStatus
  225. # Off) when the "server-status" handler is called. The default is Off.
  226. #
  227. #ExtendedStatus On
  228.  
  229. #
  230. # If you wish httpd to run as a different user or group, you must run
  231. # httpd as root initially and it will switch.  
  232. #
  233. # User/Group: The name (or #number) of the user/group to run httpd as.
  234. #  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
  235. #  . On HPUX you may not be able to use shared memory as nobody, and the
  236. #    suggested workaround is to create a user www and use that user.
  237. #  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
  238. #  when the value of (unsigned)Group is above 60000;
  239. #  don't use Group #-1 on these systems!
  240. #
  241. User apache
  242. Group apache
  243.  
  244. ### Section 2: 'Main' server configuration
  245. #
  246. # The directives in this section set up the values used by the 'main'
  247. # server, which responds to any requests that aren't handled by a
  248. # <VirtualHost> definition.  These values also provide defaults for
  249. # any <VirtualHost> containers you may define later in the file.
  250. #
  251. # All of these directives may appear inside <VirtualHost> containers,
  252. # in which case these default settings will be overridden for the
  253. # virtual host being defined.
  254. #
  255.  
  256. #
  257. # ServerAdmin: Your address, where problems with the server should be
  258. # e-mailed.  This address appears on some server-generated pages, such
  259. # as error documents.  e.g. admin@your-domain.com
  260. #
  261. ServerAdmin root@localhost
  262.  
  263. #
  264. # ServerName gives the name and port that the server uses to identify itself.
  265. # This can often be determined automatically, but we recommend you specify
  266. # it explicitly to prevent problems during startup.
  267. #
  268. # If this is not set to valid DNS name for your host, server-generated
  269. # redirections will not work.  See also the UseCanonicalName directive.
  270. #
  271. # If your host doesn't have a registered DNS name, enter its IP address here.
  272. # You will have to access it by its address anyway, and this will make
  273. # redirections work in a sensible way.
  274. #
  275. #ServerName www.example.com:80
  276.  
  277. #
  278. # UseCanonicalName: Determines how Apache constructs self-referencing
  279. # URLs and the SERVER_NAME and SERVER_PORT variables.
  280. # When set "Off", Apache will use the Hostname and Port supplied
  281. # by the client.  When set "On", Apache will use the value of the
  282. # ServerName directive.
  283. #
  284. UseCanonicalName Off
  285.  
  286. #
  287. # DocumentRoot: The directory out of which you will serve your
  288. # documents. By default, all requests are taken from this directory, but
  289. # symbolic links and aliases may be used to point to other locations.
  290. #
  291. DocumentRoot "/var/www/html"
  292.  
  293. #
  294. # Each directory to which Apache has access can be configured with respect
  295. # to which services and features are allowed and/or disabled in that
  296. # directory (and its subdirectories).
  297. #
  298. # First, we configure the "default" to be a very restrictive set of
  299. # features.  
  300. #
  301. <Directory />
  302.     Options FollowSymLinks
  303.     AllowOverride None
  304. </Directory>
  305.  
  306. #
  307. # Note that from this point forward you must specifically allow
  308. # particular features to be enabled - so if something's not working as
  309. # you might expect, make sure that you have specifically enabled it
  310. # below.
  311. #
  312.  
  313. #
  314. # This should be changed to whatever you set DocumentRoot to.
  315. #
  316. <Directory "/var/www/html">
  317.  
  318.     #
  319.     # Possible values for the Options directive are "None", "All",
  320.     # or any combination of:
  321.     #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
  322.     #
  323.     # Note that "MultiViews" must be named *explicitly* --- "Options All"
  324.     # doesn't give it to you.
  325.     #
  326.     # The Options directive is both complicated and important.  Please see
  327.     # http://httpd.apache.org/docs/2.2/mod/core.html#options
  328.     # for more information.
  329.     #
  330.     Options Indexes FollowSymLinks
  331.  
  332.     #
  333.     # AllowOverride controls what directives may be placed in .htaccess files.
  334.     # It can be "All", "None", or any combination of the keywords:
  335.     #   Options FileInfo AuthConfig Limit
  336.     #
  337.     AllowOverride None
  338.  
  339.     #
  340.     # Controls who can get stuff from this server.
  341.     #
  342.     Order allow,deny
  343.     Allow from all
  344.  
  345. </Directory>
  346.  
  347. #
  348. # UserDir: The name of the directory that is appended onto a user's home
  349. # directory if a ~user request is received.
  350. #
  351. # The path to the end user account 'public_html' directory must be
  352. # accessible to the webserver userid.  This usually means that ~userid
  353. # must have permissions of 711, ~userid/public_html must have permissions
  354. # of 755, and documents contained therein must be world-readable.
  355. # Otherwise, the client will only receive a "403 Forbidden" message.
  356. #
  357. # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
  358. #
  359. <IfModule mod_userdir.c>
  360.     #
  361.     # UserDir is disabled by default since it can confirm the presence
  362.     # of a username on the system (depending on home directory
  363.     # permissions).
  364.     #
  365.     UserDir disabled
  366.  
  367.     #
  368.     # To enable requests to /~user/ to serve the user's public_html
  369.     # directory, remove the "UserDir disabled" line above, and uncomment
  370.     # the following line instead:
  371.     #
  372.     #UserDir public_html
  373.  
  374. </IfModule>
  375.  
  376. #
  377. # Control access to UserDir directories.  The following is an example
  378. # for a site where these directories are restricted to read-only.
  379. #
  380. <Directory /home/renat/www>
  381.     AllowOverride All
  382.     Options +Indexes +FollowSymLinks -MultiViews
  383.     Order allow,deny
  384.     Allow from all
  385. </Directory>
  386.  
  387. #
  388. # DirectoryIndex: sets the file that Apache will serve if a directory
  389. # is requested.
  390. #
  391. # The index.html.var file (a type-map) is used to deliver content-
  392. # negotiated documents.  The MultiViews Option can be used for the
  393. # same purpose, but it is much slower.
  394. #
  395. DirectoryIndex index.html index.php index.html.var
  396.  
  397. #
  398. # AccessFileName: The name of the file to look for in each directory
  399. # for additional configuration directives.  See also the AllowOverride
  400. # directive.
  401. #
  402. AccessFileName .htaccess
  403.  
  404. #
  405. # The following lines prevent .htaccess and .htpasswd files from being
  406. # viewed by Web clients.
  407. #
  408. <FilesMatch "^\.ht">
  409.     Order allow,deny
  410.     Deny from all
  411.     Satisfy All
  412. </FilesMatch>
  413.  
  414. #
  415. # TypesConfig describes where the mime.types file (or equivalent) is
  416. # to be found.
  417. #
  418. TypesConfig /etc/mime.types
  419.  
  420. #
  421. # DefaultType is the default MIME type the server will use for a document
  422. # if it cannot otherwise determine one, such as from filename extensions.
  423. # If your server contains mostly text or HTML documents, "text/plain" is
  424. # a good value.  If most of your content is binary, such as applications
  425. # or images, you may want to use "application/octet-stream" instead to
  426. # keep browsers from trying to display binary files as though they are
  427. # text.
  428. #
  429. DefaultType text/plain
  430.  
  431. #
  432. # The mod_mime_magic module allows the server to use various hints from the
  433. # contents of the file itself to determine its type.  The MIMEMagicFile
  434. # directive tells the module where the hint definitions are located.
  435. #
  436. <IfModule mod_mime_magic.c>
  437. #   MIMEMagicFile /usr/share/magic.mime
  438.     MIMEMagicFile conf/magic
  439. </IfModule>
  440.  
  441. #
  442. # HostnameLookups: Log the names of clients or just their IP addresses
  443. # e.g., www.apache.org (on) or 204.62.129.132 (off).
  444. # The default is off because it'd be overall better for the net if people
  445. # had to knowingly turn this feature on, since enabling it means that
  446. # each client request will result in AT LEAST one lookup request to the
  447. # nameserver.
  448. #
  449. HostnameLookups Off
  450.  
  451. #
  452. # EnableMMAP: Control whether memory-mapping is used to deliver
  453. # files (assuming that the underlying OS supports it).
  454. # The default is on; turn this off if you serve from NFS-mounted
  455. # filesystems.  On some systems, turning it off (regardless of
  456. # filesystem) can improve performance; for details, please see
  457. # http://httpd.apache.org/docs/2.2/mod/core.html#enablemmap
  458. #
  459. #EnableMMAP off
  460.  
  461. #
  462. # EnableSendfile: Control whether the sendfile kernel support is
  463. # used to deliver files (assuming that the OS supports it).
  464. # The default is on; turn this off if you serve from NFS-mounted
  465. # filesystems.  Please see
  466. # http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile
  467. #
  468. #EnableSendfile off
  469.  
  470. #
  471. # ErrorLog: The location of the error log file.
  472. # If you do not specify an ErrorLog directive within a <VirtualHost>
  473. # container, error messages relating to that virtual host will be
  474. # logged here.  If you *do* define an error logfile for a <VirtualHost>
  475. # container, that host's errors will be logged there and not here.
  476. #
  477. ErrorLog logs/error_log
  478.  
  479. #
  480. # LogLevel: Control the number of messages logged to the error_log.
  481. # Possible values include: debug, info, notice, warn, error, crit,
  482. # alert, emerg.
  483. #
  484. LogLevel warn
  485.  
  486. #
  487. # The following directives define some format nicknames for use with
  488. # a CustomLog directive (see below).
  489. #
  490. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  491. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  492. LogFormat "%{Referer}i -> %U" referer
  493. LogFormat "%{User-agent}i" agent
  494.  
  495. # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this
  496. # requires the mod_logio module to be loaded.
  497. #LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  498.  
  499. #
  500. # The location and format of the access logfile (Common Logfile Format).
  501. # If you do not define any access logfiles within a <VirtualHost>
  502. # container, they will be logged here.  Contrariwise, if you *do*
  503. # define per-<VirtualHost> access logfiles, transactions will be
  504. # logged therein and *not* in this file.
  505. #
  506. #CustomLog logs/access_log common
  507.  
  508. #
  509. # If you would like to have separate agent and referer logfiles, uncomment
  510. # the following directives.
  511. #
  512. #CustomLog logs/referer_log referer
  513. #CustomLog logs/agent_log agent
  514.  
  515. #
  516. # For a single logfile with access, agent, and referer information
  517. # (Combined Logfile Format), use the following directive:
  518. #
  519. CustomLog logs/access_log combined
  520.  
  521. #
  522. # Optionally add a line containing the server version and virtual host
  523. # name to server-generated pages (internal error documents, FTP directory
  524. # listings, mod_status and mod_info output etc., but not CGI generated
  525. # documents or custom error documents).
  526. # Set to "EMail" to also include a mailto: link to the ServerAdmin.
  527. # Set to one of:  On | Off | EMail
  528. #
  529. ServerSignature On
  530.  
  531. #
  532. # Aliases: Add here as many aliases as you need (with no limit). The format is
  533. # Alias fakename realname
  534. #
  535. # Note that if you include a trailing / on fakename then the server will
  536. # require it to be present in the URL.  So "/icons" isn't aliased in this
  537. # example, only "/icons/".  If the fakename is slash-terminated, then the
  538. # realname must also be slash terminated, and if the fakename omits the
  539. # trailing slash, the realname must also omit it.
  540. #
  541. # We include the /icons/ alias for FancyIndexed directory listings.  If you
  542. # do not use FancyIndexing, you may comment this out.
  543. #
  544. Alias /icons/ "/var/www/icons/"
  545.  
  546. <Directory "/var/www/icons">
  547.     Options Indexes MultiViews FollowSymLinks
  548.     AllowOverride None
  549.     Order allow,deny
  550.     Allow from all
  551. </Directory>
  552.  
  553. #
  554. # WebDAV module configuration section.
  555. #
  556. <IfModule mod_dav_fs.c>
  557.     # Location of the WebDAV lock database.
  558.     DAVLockDB /var/lib/dav/lockdb
  559. </IfModule>
  560.  
  561. #
  562. # ScriptAlias: This controls which directories contain server scripts.
  563. # ScriptAliases are essentially the same as Aliases, except that
  564. # documents in the realname directory are treated as applications and
  565. # run by the server when requested rather than as documents sent to the client.
  566. # The same rules about trailing "/" apply to ScriptAlias directives as to
  567. # Alias.
  568. #
  569. ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
  570.  
  571. #
  572. # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
  573. # CGI directory exists, if you have that configured.
  574. #
  575. <Directory "/var/www/cgi-bin">
  576.     AllowOverride None
  577.     Options None
  578.     Order allow,deny
  579.     Allow from all
  580. </Directory>
  581.  
  582. #
  583. # Redirect allows you to tell clients about documents which used to exist in
  584. # your server's namespace, but do not anymore. This allows you to tell the
  585. # clients where to look for the relocated document.
  586. # Example:
  587. # Redirect permanent /foo http://www.example.com/bar
  588.  
  589. #
  590. # Directives controlling the display of server-generated directory listings.
  591. #
  592.  
  593. #
  594. # IndexOptions: Controls the appearance of server-generated directory
  595. # listings.
  596. #
  597. IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
  598.  
  599. #
  600. # AddIcon* directives tell the server which icon to show for different
  601. # files or filename extensions.  These are only displayed for
  602. # FancyIndexed directories.
  603. #
  604. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  605.  
  606. AddIconByType (TXT,/icons/text.gif) text/*
  607. AddIconByType (IMG,/icons/image2.gif) image/*
  608. AddIconByType (SND,/icons/sound2.gif) audio/*
  609. AddIconByType (VID,/icons/movie.gif) video/*
  610.  
  611. AddIcon /icons/binary.gif .bin .exe
  612. AddIcon /icons/binhex.gif .hqx
  613. AddIcon /icons/tar.gif .tar
  614. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  615. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  616. AddIcon /icons/a.gif .ps .ai .eps
  617. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  618. AddIcon /icons/text.gif .txt
  619. AddIcon /icons/c.gif .c
  620. AddIcon /icons/p.gif .pl .py
  621. AddIcon /icons/f.gif .for
  622. AddIcon /icons/dvi.gif .dvi
  623. AddIcon /icons/uuencoded.gif .uu
  624. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  625. AddIcon /icons/tex.gif .tex
  626. AddIcon /icons/bomb.gif core
  627.  
  628. AddIcon /icons/back.gif ..
  629. AddIcon /icons/hand.right.gif README
  630. AddIcon /icons/folder.gif ^^DIRECTORY^^
  631. AddIcon /icons/blank.gif ^^BLANKICON^^
  632.  
  633. #
  634. # DefaultIcon is which icon to show for files which do not have an icon
  635. # explicitly set.
  636. #
  637. DefaultIcon /icons/unknown.gif
  638.  
  639. #
  640. # AddDescription allows you to place a short description after a file in
  641. # server-generated indexes.  These are only displayed for FancyIndexed
  642. # directories.
  643. # Format: AddDescription "description" filename
  644. #
  645. #AddDescription "GZIP compressed document" .gz
  646. #AddDescription "tar archive" .tar
  647. #AddDescription "GZIP compressed tar archive" .tgz
  648.  
  649. #
  650. # ReadmeName is the name of the README file the server will look for by
  651. # default, and append to directory listings.
  652. #
  653. # HeaderName is the name of a file which should be prepended to
  654. # directory indexes.
  655. ReadmeName README.html
  656. HeaderName HEADER.html
  657.  
  658. #
  659. # IndexIgnore is a set of filenames which directory indexing should ignore
  660. # and not include in the listing.  Shell-style wildcarding is permitted.
  661. #
  662. IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
  663.  
  664. #
  665. # DefaultLanguage and AddLanguage allows you to specify the language of
  666. # a document. You can then use content negotiation to give a browser a
  667. # file in a language the user can understand.
  668. #
  669. # Specify a default language. This means that all data
  670. # going out without a specific language tag (see below) will
  671. # be marked with this one. You probably do NOT want to set
  672. # this unless you are sure it is correct for all cases.
  673. #
  674. # * It is generally better to not mark a page as
  675. # * being a certain language than marking it with the wrong
  676. # * language!
  677. #
  678. # DefaultLanguage nl
  679. #
  680. # Note 1: The suffix does not have to be the same as the language
  681. # keyword --- those with documents in Polish (whose net-standard
  682. # language code is pl) may wish to use "AddLanguage pl .po" to
  683. # avoid the ambiguity with the common suffix for perl scripts.
  684. #
  685. # Note 2: The example entries below illustrate that in some cases
  686. # the two character 'Language' abbreviation is not identical to
  687. # the two character 'Country' code for its country,
  688. # E.g. 'Danmark/dk' versus 'Danish/da'.
  689. #
  690. # Note 3: In the case of 'ltz' we violate the RFC by using a three char
  691. # specifier. There is 'work in progress' to fix this and get
  692. # the reference data for rfc1766 cleaned up.
  693. #
  694. # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
  695. # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
  696. # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
  697. # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
  698. # Norwegian (no) - Polish (pl) - Portugese (pt)
  699. # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
  700. # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
  701. #
  702. AddLanguage ca .ca
  703. AddLanguage cs .cz .cs
  704. AddLanguage da .dk
  705. AddLanguage de .de
  706. AddLanguage el .el
  707. AddLanguage en .en
  708. AddLanguage eo .eo
  709. AddLanguage es .es
  710. AddLanguage et .et
  711. AddLanguage fr .fr
  712. AddLanguage he .he
  713. AddLanguage hr .hr
  714. AddLanguage it .it
  715. AddLanguage ja .ja
  716. AddLanguage ko .ko
  717. AddLanguage ltz .ltz
  718. AddLanguage nl .nl
  719. AddLanguage nn .nn
  720. AddLanguage no .no
  721. AddLanguage pl .po
  722. AddLanguage pt .pt
  723. AddLanguage pt-BR .pt-br
  724. AddLanguage ru .ru
  725. AddLanguage sv .sv
  726. AddLanguage zh-CN .zh-cn
  727. AddLanguage zh-TW .zh-tw
  728.  
  729. #
  730. # LanguagePriority allows you to give precedence to some languages
  731. # in case of a tie during content negotiation.
  732. #
  733. # Just list the languages in decreasing order of preference. We have
  734. # more or less alphabetized them here. You probably want to change this.
  735. #
  736. LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
  737.  
  738. #
  739. # ForceLanguagePriority allows you to serve a result page rather than
  740. # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
  741. # [in case no accepted languages matched the available variants]
  742. #
  743. ForceLanguagePriority Prefer Fallback
  744.  
  745. #
  746. # Specify a default charset for all content served; this enables
  747. # interpretation of all content as UTF-8 by default.  To use the
  748. # default browser choice (ISO-8859-1), or to allow the META tags
  749. # in HTML content to override this choice, comment out this
  750. # directive:
  751. #
  752. AddDefaultCharset UTF-8
  753.  
  754. #
  755. # AddType allows you to add to or override the MIME configuration
  756. # file mime.types for specific file types.
  757. #
  758. #AddType application/x-tar .tgz
  759.  
  760. #
  761. # AddEncoding allows you to have certain browsers uncompress
  762. # information on the fly. Note: Not all browsers support this.
  763. # Despite the name similarity, the following Add* directives have nothing
  764. # to do with the FancyIndexing customization directives above.
  765. #
  766. #AddEncoding x-compress .Z
  767. #AddEncoding x-gzip .gz .tgz
  768.  
  769. # If the AddEncoding directives above are commented-out, then you
  770. # probably should define those extensions to indicate media types:
  771. #
  772. AddType application/x-compress .Z
  773. AddType application/x-gzip .gz .tgz
  774.  
  775. #
  776. #   MIME-types for downloading Certificates and CRLs
  777. #
  778. AddType application/x-x509-ca-cert .crt
  779. AddType application/x-pkcs7-crl    .crl
  780.  
  781. #
  782. # AddHandler allows you to map certain file extensions to "handlers":
  783. # actions unrelated to filetype. These can be either built into the server
  784. # or added with the Action directive (see below)
  785. #
  786. # To use CGI scripts outside of ScriptAliased directories:
  787. # (You will also need to add "ExecCGI" to the "Options" directive.)
  788. #
  789. #AddHandler cgi-script .cgi
  790.  
  791. #
  792. # For files that include their own HTTP headers:
  793. #
  794. #AddHandler send-as-is asis
  795.  
  796. #
  797. # For type maps (negotiated resources):
  798. # (This is enabled by default to allow the Apache "It Worked" page
  799. #  to be distributed in multiple languages.)
  800. #
  801. AddHandler type-map var
  802.  
  803. #
  804. # Filters allow you to process content before it is sent to the client.
  805. #
  806. # To parse .shtml files for server-side includes (SSI):
  807. # (You will also need to add "Includes" to the "Options" directive.)
  808. #
  809. AddType text/html .shtml
  810. AddOutputFilter INCLUDES .shtml
  811.  
  812. #
  813. # Action lets you define media types that will execute a script whenever
  814. # a matching file is called. This eliminates the need for repeated URL
  815. # pathnames for oft-used CGI file processors.
  816. # Format: Action media/type /cgi-script/location
  817. # Format: Action handler-name /cgi-script/location
  818. #
  819.  
  820. #
  821. # Customizable error responses come in three flavors:
  822. # 1) plain text 2) local redirects 3) external redirects
  823. #
  824. # Some examples:
  825. #ErrorDocument 500 "The server made a boo boo."
  826. #ErrorDocument 404 /missing.html
  827. #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  828. #ErrorDocument 402 http://www.example.com/subscription_info.html
  829. #
  830.  
  831. #
  832. # Putting this all together, we can internationalize error responses.
  833. #
  834. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  835. # our collection of by-error message multi-language collections.  We use
  836. # includes to substitute the appropriate text.
  837. #
  838. # You can modify the messages' appearance without changing any of the
  839. # default HTTP_<error>.html.var files by adding the line:
  840. #
  841. #   Alias /error/include/ "/your/include/path/"
  842. #
  843. # which allows you to create your own set of files by starting with the
  844. # /var/www/error/include/ files and
  845. # copying them to /your/include/path/, even on a per-VirtualHost basis.
  846. #
  847.  
  848. Alias /error/ "/var/www/error/"
  849.  
  850. <IfModule mod_negotiation.c>
  851. <IfModule mod_include.c>
  852.     <Directory "/var/www/error">
  853.         AllowOverride None
  854.         Options IncludesNoExec
  855.         AddOutputFilter Includes html
  856.         AddHandler type-map var
  857.         Order allow,deny
  858.         Allow from all
  859.         LanguagePriority en es de fr
  860.         ForceLanguagePriority Prefer Fallback
  861.     </Directory>
  862.  
  863. #    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  864. #    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  865. #    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  866. #    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  867. #    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  868. #    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  869. #    ErrorDocument 410 /error/HTTP_GONE.html.var
  870. #    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  871. #    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  872. #    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  873. #    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  874. #    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
  875. #    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  876. #    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  877. #    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  878. #    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  879. #    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  880.  
  881. </IfModule>
  882. </IfModule>
  883.  
  884. #
  885. # The following directives modify normal HTTP response behavior to
  886. # handle known problems with browser implementations.
  887. #
  888. BrowserMatch "Mozilla/2" nokeepalive
  889. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  890. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  891. BrowserMatch "Java/1\.0" force-response-1.0
  892. BrowserMatch "JDK/1\.0" force-response-1.0
  893.  
  894. #
  895. # The following directive disables redirects on non-GET requests for
  896. # a directory that does not include the trailing slash.  This fixes a
  897. # problem with Microsoft WebFolders which does not appropriately handle
  898. # redirects for folders with DAV methods.
  899. # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
  900. #
  901. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  902. BrowserMatch "MS FrontPage" redirect-carefully
  903. BrowserMatch "^WebDrive" redirect-carefully
  904. BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
  905. BrowserMatch "^gnome-vfs/1.0" redirect-carefully
  906. BrowserMatch "^XML Spy" redirect-carefully
  907. BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
  908.  
  909. #
  910. # Allow server status reports generated by mod_status,
  911. # with the URL of http://servername/server-status
  912. # Change the ".example.com" to match your domain to enable.
  913. #
  914. #<Location /server-status>
  915. #    SetHandler server-status
  916. #    Order deny,allow
  917. #    Deny from all
  918. #    Allow from .example.com
  919. #</Location>
  920.  
  921. #
  922. # Allow remote server configuration reports, with the URL of
  923. #  http://servername/server-info (requires that mod_info.c be loaded).
  924. # Change the ".example.com" to match your domain to enable.
  925. #
  926. #<Location /server-info>
  927. #    SetHandler server-info
  928. #    Order deny,allow
  929. #    Deny from all
  930. #    Allow from .example.com
  931. #</Location>
  932.  
  933. #
  934. # Proxy Server directives. Uncomment the following lines to
  935. # enable the proxy server:
  936. #
  937. #<IfModule mod_proxy.c>
  938. #ProxyRequests On
  939. #
  940. #<Proxy *>
  941. #    Order deny,allow
  942. #    Deny from all
  943. #    Allow from .example.com
  944. #</Proxy>
  945.  
  946. #
  947. # Enable/disable the handling of HTTP/1.1 "Via:" headers.
  948. # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
  949. # Set to one of: Off | On | Full | Block
  950. #
  951. #ProxyVia On
  952.  
  953. #
  954. # To enable a cache of proxied content, uncomment the following lines.
  955. # See http://httpd.apache.org/docs/2.2/mod/mod_cache.html for more details.
  956. #
  957. #<IfModule mod_disk_cache.c>
  958. #   CacheEnable disk /
  959. #   CacheRoot "/var/cache/mod_proxy"
  960. #</IfModule>
  961. #
  962.  
  963. #</IfModule>
  964. # End of proxy directives.
  965.  
  966. ### Section 3: Virtual Hosts
  967. #
  968. # VirtualHost: If you want to maintain multiple domains/hostnames on your
  969. # machine you can setup VirtualHost containers for them. Most configurations
  970. # use only name-based virtual hosts so the server doesn't need to worry about
  971. # IP addresses. This is indicated by the asterisks in the directives below.
  972. #
  973. # Please see the documentation at
  974. # <URL:http://httpd.apache.org/docs/2.2/vhosts/>
  975. # for further details before you try to setup virtual hosts.
  976. #
  977. # You may use the command line option '-S' to verify your virtual host
  978. # configuration.
  979.  
  980. #
  981. # Use name-based virtual hosting.
  982. #
  983. NameVirtualHost *:80
  984. #
  985. # NOTE: NameVirtualHost cannot be used without a port specifier
  986. # (e.g. :80) if mod_ssl is being used, due to the nature of the
  987. # SSL protocol.
  988. #
  989.  
  990. #
  991. # VirtualHost example:
  992. # Almost any Apache directive may go into a VirtualHost container.
  993. # The first VirtualHost section is used for requests without a known
  994. # server name.
  995. #
  996. #<VirtualHost *:80>
  997. #    ServerAdmin webmaster@dummy-host.example.com
  998. #    DocumentRoot /www/docs/dummy-host.example.com
  999. #    ServerName dummy-host.example.com
  1000. #    ErrorLog logs/dummy-host.example.com-error_log
  1001. #    CustomLog logs/dummy-host.example.com-access_log common
  1002. #</VirtualHost>