2
# Based upon the NCSA server configuration files originally by Rob McCool.
4
# This is the main Apache server configuration file. It contains the
5
# configuration directives that give the server its instructions.
6
# See <URL:http://httpd.apache.org/docs-2.1/> for detailed information about
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.
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.
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 "/var/log/apache2/foo.log"
28
# with ServerRoot set to "" will be interpreted by the
29
# server as "//var/log/apache2/foo.log".
32
### Section 1: Global Environment
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.
40
# ServerRoot: The top of the directory tree under which the server's
41
# configuration, error, and log files are kept.
43
# NOTE! If you intend to place this on an NFS (or otherwise network)
44
# mounted filesystem then please read the LockFile documentation (available
45
# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
46
# you will save yourself a lot of trouble.
48
# Do NOT add a slash at the end of the directory path.
50
ServerRoot "/etc/apache2"
53
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
55
#<IfModule !mpm_winnt.c>
56
#<IfModule !mpm_netware.c>
57
LockFile /var/lock/apache2/accept.lock
62
# PidFile: The file in which the server should record its process
63
# identification number when it starts.
65
PidFile /var/run/apache2.pid
68
# Timeout: The number of seconds before receives and sends time out.
73
# KeepAlive: Whether or not to allow persistent connections (more than
74
# one request per connection). Set to "Off" to deactivate.
79
# MaxKeepAliveRequests: The maximum number of requests to allow
80
# during a persistent connection. Set to 0 to allow an unlimited amount.
81
# We recommend you leave this number high, for maximum performance.
83
MaxKeepAliveRequests 100
86
# KeepAliveTimeout: Number of seconds to wait for the next request from the
87
# same client on the same connection.
92
## Server-Pool Size Regulation (MPM specific)
96
# StartServers: number of server processes to start
97
# MinSpareServers: minimum number of server processes which are kept spare
98
# MaxSpareServers: maximum number of server processes which are kept spare
99
# MaxClients: maximum number of server processes allowed to start
100
# MaxRequestsPerChild: maximum number of requests a server process serves
101
<IfModule mpm_prefork_module>
106
MaxRequestsPerChild 0
110
# StartServers: initial number of server processes to start
111
# MaxClients: maximum number of simultaneous client connections
112
# MinSpareThreads: minimum number of worker threads which are kept spare
113
# MaxSpareThreads: maximum number of worker threads which are kept spare
114
# ThreadsPerChild: constant number of worker threads in each server process
115
# MaxRequestsPerChild: maximum number of requests a server process serves
116
<IfModule mpm_worker_module>
122
MaxRequestsPerChild 0
129
# AccessFileName: The name of the file to look for in each directory
130
# for additional configuration directives. See also the AllowOverride
134
AccessFileName .htaccess
137
# The following lines prevent .htaccess and .htpasswd files from being
138
# viewed by Web clients.
145
TypesConfig /etc/mime.types
148
# DefaultType is the default MIME type the server will use for a document
149
# if it cannot otherwise determine one, such as from filename extensions.
150
# If your server contains mostly text or HTML documents, "text/plain" is
151
# a good value. If most of your content is binary, such as applications
152
# or images, you may want to use "application/octet-stream" instead to
153
# keep browsers from trying to display binary files as though they are
156
DefaultType text/plain
160
# HostnameLookups: Log the names of clients or just their IP addresses
161
# e.g., www.apache.org (on) or 204.62.129.132 (off).
162
# The default is off because it'd be overall better for the net if people
163
# had to knowingly turn this feature on, since enabling it means that
164
# each client request will result in AT LEAST one lookup request to the
169
# ErrorLog: The location of the error log file.
170
# If you do not specify an ErrorLog directive within a <VirtualHost>
171
# container, error messages relating to that virtual host will be
172
# logged here. If you *do* define an error logfile for a <VirtualHost>
173
# container, that host's errors will be logged there and not here.
175
ErrorLog /var/log/apache2/error.log
178
# LogLevel: Control the number of messages logged to the error_log.
179
# Possible values include: debug, info, notice, warn, error, crit,
184
# Include module configuration:
185
Include /etc/apache2/mods-enabled/*.load
186
Include /etc/apache2/mods-enabled/*.conf
188
# Include all the user configurations:
189
Include /etc/apache2/httpd.conf
191
# Include ports listing
192
Include /etc/apache2/ports.conf
194
# Include generic snippets of statements
195
Include /etc/apache2/conf.d/
198
# The following directives define some format nicknames for use with
199
# a CustomLog directive (see below).
201
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
202
LogFormat "%h %l %u %t \"%r\" %>s %b" common
203
LogFormat "%{Referer}i -> %U" referer
204
LogFormat "%{User-agent}i" agent
208
# This directive configures what you return as the Server HTTP response
209
# Header. The default is 'Full' which sends information about the OS-Type
210
# and compiled in modules.
211
# Set to one of: Full | OS | Minor | Minimal | Major | Prod
212
# where Full conveys the most information, and Prod the least.
217
# Optionally add a line containing the server version and virtual host
218
# name to server-generated pages (internal error documents, FTP directory
219
# listings, mod_status and mod_info output etc., but not CGI generated
220
# documents or custom error documents).
221
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
222
# Set to one of: On | Off | EMail
226
<IfModule alias_module>
228
# Aliases: Add here as many aliases as you need (with no limit). The format is
229
# Alias fakename realname
231
# Note that if you include a trailing / on fakename then the server will
232
# require it to be present in the URL. So "/icons" isn't aliased in this
233
# example, only "/icons/". If the fakename is slash-terminated, then the
234
# realname must also be slash terminated, and if the fakename omits the
235
# trailing slash, the realname must also omit it.
237
# We include the /icons/ alias for FancyIndexed directory listings. If
238
# you do not use FancyIndexing, you may comment this out.
240
Alias /icons/ "/usr/share/apache2/icons/"
242
<Directory "/usr/share/apache2/icons">
243
Options Indexes MultiViews
252
# Directives controlling the display of server-generated directory listings.
254
<IfModule mod_autoindex.c>
257
# IndexOptions: Controls the appearance of server-generated directory
260
IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=*
263
# AddIcon* directives tell the server which icon to show for different
264
# files or filename extensions. These are only displayed for
265
# FancyIndexed directories.
267
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
269
AddIconByType (TXT,/icons/text.gif) text/*
270
AddIconByType (IMG,/icons/image2.gif) image/*
271
AddIconByType (SND,/icons/sound2.gif) audio/*
272
AddIconByType (VID,/icons/movie.gif) video/*
274
AddIcon /icons/binary.gif .bin .exe
275
AddIcon /icons/binhex.gif .hqx
276
AddIcon /icons/tar.gif .tar
277
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
278
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
279
AddIcon /icons/a.gif .ps .ai .eps
280
AddIcon /icons/layout.gif .html .shtml .htm .pdf
281
AddIcon /icons/text.gif .txt
282
AddIcon /icons/c.gif .c
283
AddIcon /icons/p.gif .pl .py
284
AddIcon /icons/f.gif .for
285
AddIcon /icons/dvi.gif .dvi
286
AddIcon /icons/uuencoded.gif .uu
287
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
288
AddIcon /icons/tex.gif .tex
289
AddIcon /icons/bomb.gif core
291
AddIcon /icons/back.gif ..
292
AddIcon /icons/hand.right.gif README
293
AddIcon /icons/folder.gif ^^DIRECTORY^^
294
AddIcon /icons/blank.gif ^^BLANKICON^^
297
# DefaultIcon is which icon to show for files which do not have an icon
300
DefaultIcon /icons/unknown.gif
303
# AddDescription allows you to place a short description after a file in
304
# server-generated indexes. These are only displayed for FancyIndexed
306
# Format: AddDescription "description" filename
308
#AddDescription "GZIP compressed document" .gz
309
#AddDescription "tar archive" .tar
310
#AddDescription "GZIP compressed tar archive" .tgz
313
# ReadmeName is the name of the README file the server will look for by
314
# default, and append to directory listings.
316
# HeaderName is the name of a file which should be prepended to
318
ReadmeName README.html
319
HeaderName HEADER.html
322
# IndexIgnore is a set of filenames which directory indexing should ignore
323
# and not include in the listing. Shell-style wildcarding is permitted.
325
IndexIgnore .??* *~ *# RCS CVS *,v *,t
328
<IfModule mod_mime.c>
331
# AddType allows you to add to or override the MIME configuration
332
# file mime.types for specific file types.
334
#AddType application/x-gzip .tgz
336
# AddEncoding allows you to have certain browsers uncompress
337
# information on the fly. Note: Not all browsers support this.
338
# Despite the name similarity, the following Add* directives have
339
# nothing to do with the FancyIndexing customization directives above.
341
#AddEncoding x-compress .Z
342
#AddEncoding x-gzip .gz .tgz
344
# If the AddEncoding directives above are commented-out, then you
345
# probably should define those extensions to indicate media types:
347
AddType application/x-compress .Z
348
AddType application/x-gzip .gz .tgz
351
# DefaultLanguage and AddLanguage allows you to specify the language of
352
# a document. You can then use content negotiation to give a browser a
353
# file in a language the user can understand.
355
# Specify a default language. This means that all data
356
# going out without a specific language tag (see below) will
357
# be marked with this one. You probably do NOT want to set
358
# this unless you are sure it is correct for all cases.
360
# * It is generally better to not mark a page as
361
# * being a certain language than marking it with the wrong
366
# Note 1: The suffix does not have to be the same as the language
367
# keyword --- those with documents in Polish (whose net-standard
368
# language code is pl) may wish to use "AddLanguage pl .po" to
369
# avoid the ambiguity with the common suffix for perl scripts.
371
# Note 2: The example entries below illustrate that in some cases
372
# the two character 'Language' abbreviation is not identical to
373
# the two character 'Country' code for its country,
374
# E.g. 'Danmark/dk' versus 'Danish/da'.
376
# Note 3: In the case of 'ltz' we violate the RFC by using a three char
377
# specifier. There is 'work in progress' to fix this and get
378
# the reference data for rfc1766 cleaned up.
380
# Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
381
# English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
382
# Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
383
# Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
384
# Norwegian (no) - Polish (pl) - Portugese (pt)
385
# Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
386
# Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
389
AddLanguage cs .cz .cs
409
AddLanguage pt-BR .pt-br
412
AddLanguage zh-CN .zh-cn
413
AddLanguage zh-TW .zh-tw
416
<IfModule mod_negotiation.c>
418
# LanguagePriority allows you to give precedence to some languages
419
# in case of a tie during content negotiation.
421
# Just list the languages in decreasing order of preference. We have
422
# more or less alphabetized them here. You probably want to change this.
424
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
427
# ForceLanguagePriority allows you to serve a result page rather than
428
# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
429
# [in case no accepted languages matched the available variants]
431
ForceLanguagePriority Prefer Fallback
435
<IfModule mod_mime.c>
437
# Specify a default charset for all pages sent out. This is
438
# always a good idea and opens the door for future internationalisation
439
# of your web site, should you ever want it. Specifying it as
440
# a default does little harm; as the standard dictates that a page
441
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
442
# are merely stating the obvious. There are also some security
443
# reasons in browsers, related to javascript and URL parsing
444
# which encourage you to always set a default char set.
446
#AddDefaultCharset ISO-8859-1
449
# Commonly used filename extensions to character sets. You probably
450
# want to avoid clashes with the language extensions, unless you
451
# are good at carefully testing your setup after each change.
452
# See http://www.iana.org/assignments/character-sets for the
453
# official list of charset names and their respective RFCs.
455
AddCharset us-ascii .ascii .us-ascii
456
AddCharset ISO-8859-1 .iso8859-1 .latin1
457
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
458
AddCharset ISO-8859-3 .iso8859-3 .latin3
459
AddCharset ISO-8859-4 .iso8859-4 .latin4
460
AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru
461
AddCharset ISO-8859-6 .iso8859-6 .arb .arabic
462
AddCharset ISO-8859-7 .iso8859-7 .grk .greek
463
AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew
464
AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk
465
AddCharset ISO-8859-10 .iso8859-10 .latin6
466
AddCharset ISO-8859-13 .iso8859-13
467
AddCharset ISO-8859-14 .iso8859-14 .latin8
468
AddCharset ISO-8859-15 .iso8859-15 .latin9
469
AddCharset ISO-8859-16 .iso8859-16 .latin10
470
AddCharset ISO-2022-JP .iso2022-jp .jis
471
AddCharset ISO-2022-KR .iso2022-kr .kis
472
AddCharset ISO-2022-CN .iso2022-cn .cis
473
AddCharset Big5 .Big5 .big5 .b5
474
AddCharset cn-Big5 .cn-big5
475
# For russian, more than one charset is used (depends on client, mostly):
476
AddCharset WINDOWS-1251 .cp-1251 .win-1251
477
AddCharset CP866 .cp866
478
AddCharset KOI8 .koi8
479
AddCharset KOI8-E .koi8-e
480
AddCharset KOI8-r .koi8-r .koi8-ru
481
AddCharset KOI8-U .koi8-u
482
AddCharset KOI8-ru .koi8-uk .ua
483
AddCharset ISO-10646-UCS-2 .ucs2
484
AddCharset ISO-10646-UCS-4 .ucs4
485
AddCharset UTF-7 .utf7
486
AddCharset UTF-8 .utf8
487
AddCharset UTF-16 .utf16
488
AddCharset UTF-16BE .utf16be
489
AddCharset UTF-16LE .utf16le
490
AddCharset UTF-32 .utf32
491
AddCharset UTF-32BE .utf32be
492
AddCharset UTF-32LE .utf32le
493
AddCharset euc-cn .euc-cn
494
AddCharset euc-gb .euc-gb
495
AddCharset euc-jp .euc-jp
496
AddCharset euc-kr .euc-kr
497
#Not sure how euc-tw got in - IANA doesn't list it???
498
AddCharset EUC-TW .euc-tw
499
AddCharset gb2312 .gb2312 .gb
500
AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
501
AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
502
AddCharset shift_jis .shift_jis .sjis
505
# AddHandler allows you to map certain file extensions to "handlers":
506
# actions unrelated to filetype. These can be either built into the server
507
# or added with the Action directive (see below)
509
# To use CGI scripts outside of ScriptAliased directories:
510
# (You will also need to add "ExecCGI" to the "Options" directive.)
512
#AddHandler cgi-script .cgi
515
# For files that include their own HTTP headers:
517
#AddHandler send-as-is asis
520
# For server-parsed imagemap files:
522
#AddHandler imap-file map
525
# For type maps (negotiated resources):
526
# (This is enabled by default to allow the Apache "It Worked" page
527
# to be distributed in multiple languages.)
529
AddHandler type-map var
532
# Filters allow you to process content before it is sent to the client.
534
# To parse .shtml files for server-side includes (SSI):
535
# (You will also need to add "Includes" to the "Options" directive.)
537
AddType text/html .shtml
538
AddOutputFilter INCLUDES .shtml
542
# Action lets you define media types that will execute a script whenever
543
# a matching file is called. This eliminates the need for repeated URL
544
# pathnames for oft-used CGI file processors.
545
# Format: Action media/type /cgi-script/location
546
# Format: Action handler-name /cgi-script/location
550
# Customizable error responses come in three flavors:
551
# 1) plain text 2) local redirects 3) external redirects
554
#ErrorDocument 500 "The server made a boo boo."
555
#ErrorDocument 404 /missing.html
556
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
557
#ErrorDocument 402 http://www.example.com/subscription_info.html
561
# Putting this all together, we can internationalize error responses.
563
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
564
# our collection of by-error message multi-language collections. We use
565
# includes to substitute the appropriate text.
567
# You can modify the messages' appearance without changing any of the
568
# default HTTP_<error>.html.var files by adding the line:
570
# Alias /error/include/ "/your/include/path/"
572
# which allows you to create your own set of files by starting with the
573
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
574
# even on a per-VirtualHost basis. The default include files will display
575
# your Apache version number and your ServerAdmin email address regardless
576
# of the setting of ServerSignature.
578
# The internationalized error documents require mod_alias, mod_include
579
# and mod_negotiation. To activate them, uncomment the following 30 lines.
581
# Alias /error/ "/usr/share/apache2/error/"
583
# <Directory "/usr/share/apache2/error">
585
# Options IncludesNoExec
586
# AddOutputFilter Includes html
587
# AddHandler type-map var
590
# LanguagePriority en cs de es fr it nl sv pt-br ro
591
# ForceLanguagePriority Prefer Fallback
594
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
595
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
596
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
597
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
598
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
599
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
600
# ErrorDocument 410 /error/HTTP_GONE.html.var
601
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
602
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
603
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
604
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
605
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
606
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
607
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
608
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
609
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
610
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
612
<IfModule mod_setenvif.c>
614
# The following directives modify normal HTTP response behavior to
615
# handle known problems with browser implementations.
617
BrowserMatch "Mozilla/2" nokeepalive
618
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
619
BrowserMatch "RealPlayer 4\.0" force-response-1.0
620
BrowserMatch "Java/1\.0" force-response-1.0
621
BrowserMatch "JDK/1\.0" force-response-1.0
624
# The following directive disables redirects on non-GET requests for
625
# a directory that does not include the trailing slash. This fixes a
626
# problem with Microsoft WebFolders which does not appropriately handle
627
# redirects for folders with DAV methods.
628
# Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
630
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
631
BrowserMatch "MS FrontPage" redirect-carefully
632
BrowserMatch "^WebDrive" redirect-carefully
633
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
634
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
635
BrowserMatch "^XML Spy" redirect-carefully
636
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
639
#<IfModule mod_status.c>
641
# Allow server status reports generated by mod_status,
642
# with the URL of http://servername/server-status
643
# Change the ".example.com" to match your domain to enable.
645
#<Location /server-status>
646
# SetHandler server-status
649
# Allow from .example.com
653
#<IfModule mod_info.c>
655
# Allow remote server configuration reports, with the URL of
656
# http://servername/server-info (requires that mod_info.c be loaded).
657
# Change the ".example.com" to match your domain to enable.
659
#<Location /server-info>
660
# SetHandler server-info
663
# Allow from .example.com
667
# Include the virtual host configurations:
668
Include /etc/apache2/sites-enabled/