1
# Based upon the NCSA server configuration files originally by Rob McCool.
2
# Changed extensively for the Debian package by Daniel Stone <daniel@sfarc.net>
3
# and also by Thom May <thom@debian.org>.
5
# ServerRoot: The top of the directory tree under which the server's
6
# configuration, error, and log files are kept.
8
# NOTE! If you intend to place this on an NFS (or otherwise network)
9
# mounted filesystem then please read the LockFile documentation
10
# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
11
# you will save yourself a lot of trouble.
13
ServerRoot "/etc/apache2"
15
# The LockFile directive sets the path to the lockfile used when Apache
16
# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
17
# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
18
# its default value. The main reason for changing it is if the logs
19
# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
20
# DISK. The PID of the main server process is automatically appended to
23
LockFile /var/lock/apache2/accept.lock
25
# PidFile: The file in which the server should record its process
26
# identification number when it starts.
28
PidFile /var/run/apache2.pid
30
# Timeout: The number of seconds before receives and sends time out.
34
# KeepAlive: Whether or not to allow persistent connections (more than
35
# one request per connection). Set to "Off" to deactivate.
39
# MaxKeepAliveRequests: The maximum number of requests to allow
40
# during a persistent connection. Set to 0 to allow an unlimited amount.
41
# We recommend you leave this number high, for maximum performance.
43
MaxKeepAliveRequests 100
45
# KeepAliveTimeout: Number of seconds to wait for the next request from the
46
# same client on the same connection.
51
## Server-Pool Size Regulation (MPM specific)
55
# StartServers ......... number of server processes to start
56
# MinSpareServers ...... minimum number of server processes which are kept spare
57
# MaxSpareServers ...... maximum number of server processes which are kept spare
58
# MaxClients ........... maximum number of server processes allowed to start
59
# MaxRequestsPerChild .. maximum number of requests a server process serves
69
# StartServers ......... initial number of server processes to start
70
# MaxClients ........... maximum number of server processes allowed to start
71
# MinSpareThreads ...... minimum number of worker threads which are kept spare
72
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
73
# ThreadsPerChild ...... constant number of worker threads in each server process
74
# MaxRequestsPerChild .. maximum number of requests a server process serves
85
# NumServers ........... constant number of server processes
86
# StartThreads ......... initial number of worker threads in each server process
87
# MinSpareThreads ...... minimum number of worker threads which are kept spare
88
# MaxSpareThreads ...... maximum number of worker threads which are kept spare
89
# MaxThreadsPerChild ... maximum number of worker threads in each server process
90
# MaxRequestsPerChild .. maximum number of connections per server process (then it dies)
104
# The following directives define some format nicknames for use with
105
# a CustomLog directive (see below).
106
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
107
LogFormat "%h %l %u %t \"%r\" %>s %b" common
108
LogFormat "%{Referer}i -> %U" referer
109
LogFormat "%{User-agent}i" agent
113
ErrorLog /var/log/apache2/error.log
115
# Include module configuration:
116
Include /etc/apache2/mods-enabled/*.load
117
Include /etc/apache2/mods-enabled/*.conf
119
# Include all the user configurations:
120
Include /etc/apache2/httpd.conf
122
# Include ports listing
123
Include /etc/apache2/ports.conf
125
# Include generic snippets of statements
126
Include /etc/apache2/conf.d/[^.#]*
128
#Let's have some Icons, shall we?
129
Alias /icons/ "/usr/share/apache2/icons/"
130
<Directory "/usr/share/apache2/icons">
131
Options Indexes MultiViews
137
# Set up the default error docs.
139
# Customizable error responses come in three flavors:
140
# 1) plain text 2) local redirects 3) external redirects
143
#ErrorDocument 500 "The server made a boo boo."
144
#ErrorDocument 404 /missing.html
145
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
146
#ErrorDocument 402 http://www.example.com/subscription_info.html
150
# Putting this all together, we can Internationalize error responses.
152
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
153
# our collection of by-error message multi-language collections. We use
154
# includes to substitute the appropriate text.
156
# You can modify the messages' appearance without changing any of the
157
# default HTTP_<error>.html.var files by adding the line;
159
# Alias /error/include/ "/your/include/path/"
161
# which allows you to create your own set of files by starting with the
162
# /usr/local/apache2/error/include/ files and
163
# copying them to /your/include/path/, even on a per-VirtualHost basis.
166
<IfModule mod_negotiation.c>
167
<IfModule mod_include.c>
168
Alias /error/ "/usr/share/apache2/error/"
170
<Directory "/usr/share/apache2/error">
172
Options IncludesNoExec
173
AddOutputFilter Includes html
174
AddHandler type-map var
177
LanguagePriority en es de fr
178
ForceLanguagePriority Prefer Fallback
181
ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
182
ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
183
ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
184
ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
185
ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
186
ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
187
ErrorDocument 410 /error/HTTP_GONE.html.var
188
ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
189
ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
190
ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
191
ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
192
ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
193
ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
194
ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
195
ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
196
ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
197
ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
202
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
204
# UserDir is now a module
206
#UserDir disabled root
208
#<Directory /home/*/public_html>
209
# AllowOverride FileInfo AuthConfig Limit
210
# Options Indexes SymLinksIfOwnerMatch IncludesNoExec
213
AccessFileName .htaccess
222
TypesConfig /etc/mime.types
223
DefaultType text/plain
227
IndexOptions FancyIndexing VersionSort
229
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
231
AddIconByType (TXT,/icons/text.gif) text/*
232
AddIconByType (IMG,/icons/image2.gif) image/*
233
AddIconByType (SND,/icons/sound2.gif) audio/*
234
AddIconByType (VID,/icons/movie.gif) video/*
236
# This really should be .jpg.
238
AddIcon /icons/binary.gif .bin .exe
239
AddIcon /icons/binhex.gif .hqx
240
AddIcon /icons/tar.gif .tar
241
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
242
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
243
AddIcon /icons/a.gif .ps .ai .eps
244
AddIcon /icons/layout.gif .html .shtml .htm .pdf
245
AddIcon /icons/text.gif .txt
246
AddIcon /icons/c.gif .c
247
AddIcon /icons/p.gif .pl .py
248
AddIcon /icons/f.gif .for
249
AddIcon /icons/dvi.gif .dvi
250
AddIcon /icons/uuencoded.gif .uu
251
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
252
AddIcon /icons/tex.gif .tex
253
AddIcon /icons/bomb.gif core
255
AddIcon /icons/back.gif ..
256
AddIcon /icons/hand.right.gif README
257
AddIcon /icons/folder.gif ^^DIRECTORY^^
258
AddIcon /icons/blank.gif ^^BLANKICON^^
261
# This is from Matty J's patch. Anyone want to make the icons?
262
#AddIcon /icons/dirsymlink.jpg ^^SYMDIR^^
263
#AddIcon /icons/symlink.jpg ^^SYMLINK^^
265
DefaultIcon /icons/unknown.gif
267
ReadmeName README.html
268
HeaderName HEADER.html
270
IndexIgnore .??* *~ *# HEADER* RCS CVS *,t
272
AddEncoding x-compress Z
273
AddEncoding x-gzip gz tgz
288
AddLanguage pt-br .pt-br
296
AddLanguage zh-tw .tw
298
LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
301
#AddDefaultCharset ISO-8859-1
303
AddCharset ISO-8859-1 .iso8859-1 .latin1
304
AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
305
AddCharset ISO-8859-3 .iso8859-3 .latin3
306
AddCharset ISO-8859-4 .iso8859-4 .latin4
307
AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
308
AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
309
AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
310
AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
311
AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
312
AddCharset ISO-2022-JP .iso2022-jp .jis
313
AddCharset ISO-2022-KR .iso2022-kr .kis
314
AddCharset ISO-2022-CN .iso2022-cn .cis
315
AddCharset Big5 .Big5 .big5
316
# For russian, more than one charset is used (depends on client, mostly):
317
AddCharset WINDOWS-1251 .cp-1251 .win-1251
318
AddCharset CP866 .cp866
319
AddCharset KOI8-r .koi8-r .koi8-ru
320
AddCharset KOI8-ru .koi8-uk .ua
321
AddCharset ISO-10646-UCS-2 .ucs2
322
AddCharset ISO-10646-UCS-4 .ucs4
323
AddCharset UTF-8 .utf8
325
AddCharset GB2312 .gb2312 .gb
326
AddCharset utf-7 .utf7
327
AddCharset utf-8 .utf8
328
AddCharset big5 .big5 .b5
329
AddCharset EUC-TW .euc-tw
330
AddCharset EUC-JP .euc-jp
331
AddCharset EUC-KR .euc-kr
332
AddCharset shift_jis .sjis
334
#AddType application/x-httpd-php .php
335
#AddType application/x-httpd-php-source .phps
337
AddType application/x-tar .tgz
339
# To use CGI scripts outside /cgi-bin/:
341
#AddHandler cgi-script .cgi
343
# To use server-parsed HTML files
345
<FilesMatch "\.shtml(\..+)?$">
346
SetOutputFilter INCLUDES
349
# If you wish to use server-parsed imagemap files, use
351
#AddHandler imap-file map
353
BrowserMatch "Mozilla/2" nokeepalive
354
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
355
BrowserMatch "RealPlayer 4\.0" force-response-1.0
356
BrowserMatch "Java/1\.0" force-response-1.0
357
BrowserMatch "JDK/1\.0" force-response-1.0
360
# The following directive disables redirects on non-GET requests for
361
# a directory that does not include the trailing slash. This fixes a
362
# problem with Microsoft WebFolders which does not appropriately handle
363
# redirects for folders with DAV methods.
366
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
367
BrowserMatch "^WebDrive" redirect-carefully
368
BrowserMatch "^gnome-vfs" redirect-carefully
369
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
371
# Allow server status reports, with the URL of http://servername/server-status
372
# Change the ".your_domain.com" to match your domain to enable.
374
#<Location /server-status>
375
# SetHandler server-status
378
# Allow from .your_domain.com
381
# Allow remote server configuration reports, with the URL of
382
# http://servername/server-info (requires that mod_info.c be loaded).
383
# Change the ".your_domain.com" to match your domain to enable.
385
#<Location /server-info>
386
# SetHandler server-info
389
# Allow from .your_domain.com
392
# Include the virtual host configurations:
393
Include /etc/apache2/sites-enabled/[^.#]*