httpd.conf 33 KB

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