~ubuntu-branches/ubuntu/feisty/apache2/feisty

« back to all changes in this revision

Viewing changes to debian/apache2.conf

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Barth
  • Date: 2006-12-09 21:05:45 UTC
  • mfrom: (0.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061209210545-h70s0xaqc2v8vqr2
Tags: 2.2.3-3.2
* Non-maintainer upload.
* 043_ajp_connection_reuse: Patch from upstream Bugzilla, fixing a critical
  issue with regard to connection reuse in mod_proxy_ajp.
  Closes: #396265

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Based upon the NCSA server configuration files originally by Rob McCool.
 
3
#
 
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
 
7
# the directives.
 
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 "/var/log/apache2/foo.log"
 
28
# with ServerRoot set to "" will be interpreted by the
 
29
# server as "//var/log/apache2/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
# ServerRoot: The top of the directory tree under which the server's
 
41
# configuration, error, and log files are kept.
 
42
#
 
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.
 
47
#
 
48
# Do NOT add a slash at the end of the directory path.
 
49
#
 
50
ServerRoot "/etc/apache2"
 
51
 
 
52
#
 
53
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
 
54
#
 
55
#<IfModule !mpm_winnt.c>
 
56
#<IfModule !mpm_netware.c>
 
57
LockFile /var/lock/apache2/accept.lock
 
58
#</IfModule>
 
59
#</IfModule>
 
60
 
 
61
#
 
62
# PidFile: The file in which the server should record its process
 
63
# identification number when it starts.
 
64
#
 
65
PidFile /var/run/apache2.pid
 
66
 
 
67
#
 
68
# Timeout: The number of seconds before receives and sends time out.
 
69
#
 
70
Timeout 300
 
71
 
 
72
#
 
73
# KeepAlive: Whether or not to allow persistent connections (more than
 
74
# one request per connection). Set to "Off" to deactivate.
 
75
#
 
76
KeepAlive On
 
77
 
 
78
#
 
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.
 
82
#
 
83
MaxKeepAliveRequests 100
 
84
 
 
85
#
 
86
# KeepAliveTimeout: Number of seconds to wait for the next request from the
 
87
# same client on the same connection.
 
88
#
 
89
KeepAliveTimeout 15
 
90
 
 
91
##
 
92
## Server-Pool Size Regulation (MPM specific)
 
93
## 
 
94
 
 
95
# prefork MPM
 
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 prefork.c>
 
102
    StartServers          5
 
103
    MinSpareServers       5
 
104
    MaxSpareServers      10
 
105
    MaxClients          150
 
106
    MaxRequestsPerChild   0
 
107
</IfModule>
 
108
 
 
109
# worker MPM
 
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 worker.c>
 
117
    StartServers          2
 
118
    MaxClients          150
 
119
    MinSpareThreads      25
 
120
    MaxSpareThreads      75 
 
121
    ThreadsPerChild      25
 
122
    MaxRequestsPerChild   0
 
123
</IfModule>
 
124
 
 
125
# perchild MPM
 
126
# NumServers: constant number of server processes
 
127
# StartThreads: initial number of worker threads in each server process
 
128
# MinSpareThreads: minimum number of worker threads which are kept spare
 
129
# MaxSpareThreads: maximum number of worker threads which are kept spare
 
130
# MaxThreadsPerChild: maximum number of worker threads in each server process
 
131
# MaxRequestsPerChild: maximum number of connections per server process
 
132
<IfModule perchild.c>
 
133
    NumServers            5
 
134
    StartThreads          5
 
135
    MinSpareThreads       5
 
136
    MaxSpareThreads      10
 
137
    MaxThreadsPerChild   20
 
138
    MaxRequestsPerChild   0
 
139
    AcceptMutex fcntl
 
140
</IfModule>
 
141
 
 
142
User www-data
 
143
Group www-data
 
144
 
 
145
AccessFileName .htaccess
 
146
#
 
147
# The following lines prevent .htaccess and .htpasswd files from being 
 
148
# viewed by Web clients. 
 
149
#
 
150
<Files ~ "^\.ht">
 
151
    Order allow,deny
 
152
    Deny from all
 
153
</Files>
 
154
 
 
155
TypesConfig /etc/mime.types
 
156
 
 
157
#
 
158
# DefaultType is the default MIME type the server will use for a document
 
159
# if it cannot otherwise determine one, such as from filename extensions.
 
160
# If your server contains mostly text or HTML documents, "text/plain" is
 
161
# a good value.  If most of your content is binary, such as applications
 
162
# or images, you may want to use "application/octet-stream" instead to
 
163
# keep browsers from trying to display binary files as though they are
 
164
# text.
 
165
#
 
166
DefaultType text/plain
 
167
 
 
168
 
 
169
#
 
170
# HostnameLookups: Log the names of clients or just their IP addresses
 
171
# e.g., www.apache.org (on) or 204.62.129.132 (off).
 
172
# The default is off because it'd be overall better for the net if people
 
173
# had to knowingly turn this feature on, since enabling it means that
 
174
# each client request will result in AT LEAST one lookup request to the
 
175
# nameserver.
 
176
#
 
177
HostnameLookups Off
 
178
 
 
179
# ErrorLog: The location of the error log file.
 
180
# If you do not specify an ErrorLog directive within a <VirtualHost>
 
181
# container, error messages relating to that virtual host will be
 
182
# logged here.  If you *do* define an error logfile for a <VirtualHost>
 
183
# container, that host's errors will be logged there and not here.
 
184
#
 
185
ErrorLog /var/log/apache2/error_log
 
186
 
 
187
#
 
188
# LogLevel: Control the number of messages logged to the error_log.
 
189
# Possible values include: debug, info, notice, warn, error, crit,
 
190
# alert, emerg.
 
191
#
 
192
LogLevel warn
 
193
 
 
194
# Include module configuration:
 
195
Include /etc/apache2/mods-enabled/*.load
 
196
Include /etc/apache2/mods-enabled/*.conf
 
197
 
 
198
# Include all the user configurations:
 
199
Include /etc/apache2/httpd.conf
 
200
 
 
201
# Include ports listing
 
202
Include /etc/apache2/ports.conf
 
203
 
 
204
# Include generic snippets of statements
 
205
Include /etc/apache2/conf.d/[^.#]*
 
206
 
 
207
#
 
208
# The following directives define some format nicknames for use with
 
209
# a CustomLog directive (see below).
 
210
#
 
211
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
 
212
LogFormat "%h %l %u %t \"%r\" %>s %b" common
 
213
LogFormat "%{Referer}i -> %U" referer
 
214
LogFormat "%{User-agent}i" agent
 
215
 
 
216
#
 
217
# ServerTokens
 
218
# This directive configures what you return as the Server HTTP response
 
219
# Header. The default is 'Full' which sends information about the OS-Type
 
220
# and compiled in modules.
 
221
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
 
222
# where Full conveys the most information, and Prod the least.
 
223
#
 
224
ServerTokens Full
 
225
 
 
226
#
 
227
# Optionally add a line containing the server version and virtual host
 
228
# name to server-generated pages (internal error documents, FTP directory 
 
229
# listings, mod_status and mod_info output etc., but not CGI generated 
 
230
# documents or custom error documents).
 
231
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
 
232
# Set to one of:  On | Off | EMail
 
233
#
 
234
ServerSignature On
 
235
 
 
236
<IfModule mod_alias.c>
 
237
    #
 
238
    # Aliases: Add here as many aliases as you need (with no limit). The format is 
 
239
    # Alias fakename realname
 
240
    #
 
241
    # Note that if you include a trailing / on fakename then the server will
 
242
    # require it to be present in the URL.  So "/icons" isn't aliased in this
 
243
    # example, only "/icons/".  If the fakename is slash-terminated, then the 
 
244
    # realname must also be slash terminated, and if the fakename omits the 
 
245
    # trailing slash, the realname must also omit it.
 
246
    #
 
247
    # We include the /icons/ alias for FancyIndexed directory listings.  If
 
248
    # you do not use FancyIndexing, you may comment this out.
 
249
    #
 
250
    Alias /icons/ "/usr/share/apache2/icons/"
 
251
 
 
252
    <Directory "/usr/share/apache2/icons">
 
253
        Options Indexes MultiViews
 
254
        AllowOverride None
 
255
        Order allow,deny
 
256
        Allow from all
 
257
    </Directory>
 
258
 
 
259
</IfModule>
 
260
 
 
261
#
 
262
# Directives controlling the display of server-generated directory listings.
 
263
#
 
264
<IfModule mod_autoindex.c>
 
265
 
 
266
    #
 
267
    # IndexOptions: Controls the appearance of server-generated directory
 
268
    # listings.
 
269
    #
 
270
    IndexOptions FancyIndexing VersionSort
 
271
 
 
272
    #
 
273
    # AddIcon* directives tell the server which icon to show for different
 
274
    # files or filename extensions.  These are only displayed for
 
275
    # FancyIndexed directories.
 
276
    #
 
277
    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
 
278
 
 
279
    AddIconByType (TXT,/icons/text.gif) text/*
 
280
    AddIconByType (IMG,/icons/image2.gif) image/*
 
281
    AddIconByType (SND,/icons/sound2.gif) audio/*
 
282
    AddIconByType (VID,/icons/movie.gif) video/*
 
283
 
 
284
    AddIcon /icons/binary.gif .bin .exe
 
285
    AddIcon /icons/binhex.gif .hqx
 
286
    AddIcon /icons/tar.gif .tar
 
287
    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
 
288
    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
 
289
    AddIcon /icons/a.gif .ps .ai .eps
 
290
    AddIcon /icons/layout.gif .html .shtml .htm .pdf
 
291
    AddIcon /icons/text.gif .txt
 
292
    AddIcon /icons/c.gif .c
 
293
    AddIcon /icons/p.gif .pl .py
 
294
    AddIcon /icons/f.gif .for
 
295
    AddIcon /icons/dvi.gif .dvi
 
296
    AddIcon /icons/uuencoded.gif .uu
 
297
    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
 
298
    AddIcon /icons/tex.gif .tex
 
299
    AddIcon /icons/bomb.gif core
 
300
 
 
301
    AddIcon /icons/back.gif ..
 
302
    AddIcon /icons/hand.right.gif README
 
303
    AddIcon /icons/folder.gif ^^DIRECTORY^^
 
304
    AddIcon /icons/blank.gif ^^BLANKICON^^
 
305
 
 
306
    #
 
307
    # DefaultIcon is which icon to show for files which do not have an icon
 
308
    # explicitly set.
 
309
    #
 
310
    DefaultIcon /icons/unknown.gif
 
311
 
 
312
    #
 
313
    # AddDescription allows you to place a short description after a file in
 
314
    # server-generated indexes.  These are only displayed for FancyIndexed
 
315
    # directories.
 
316
    # Format: AddDescription "description" filename
 
317
    #
 
318
    #AddDescription "GZIP compressed document" .gz
 
319
    #AddDescription "tar archive" .tar
 
320
    #AddDescription "GZIP compressed tar archive" .tgz
 
321
 
 
322
    #
 
323
    # ReadmeName is the name of the README file the server will look for by
 
324
    # default, and append to directory listings.
 
325
    #
 
326
    # HeaderName is the name of a file which should be prepended to
 
327
    # directory indexes. 
 
328
    ReadmeName README.html
 
329
    HeaderName HEADER.html
 
330
 
 
331
    #
 
332
    # IndexIgnore is a set of filenames which directory indexing should ignore
 
333
    # and not include in the listing.  Shell-style wildcarding is permitted.
 
334
    #
 
335
    IndexIgnore .??* *~ *# RCS CVS *,v *,t 
 
336
</IfModule>
 
337
 
 
338
<IfModule mod_mime.c>
 
339
 
 
340
    #
 
341
    # AddType allows you to add to or override the MIME configuration
 
342
    # file mime.types for specific file types.
 
343
    #
 
344
    #AddType application/x-gzip .tgz
 
345
    #
 
346
    # AddEncoding allows you to have certain browsers uncompress
 
347
    # information on the fly. Note: Not all browsers support this.
 
348
    # Despite the name similarity, the following Add* directives have
 
349
    # nothing to do with the FancyIndexing customization directives above.
 
350
    #
 
351
    #AddEncoding x-compress .Z
 
352
    #AddEncoding x-gzip .gz .tgz
 
353
    #
 
354
    # If the AddEncoding directives above are commented-out, then you
 
355
    # probably should define those extensions to indicate media types:
 
356
    #
 
357
    AddType application/x-compress .Z
 
358
    AddType application/x-gzip .gz .tgz
 
359
 
 
360
    #
 
361
    # DefaultLanguage and AddLanguage allows you to specify the language of 
 
362
    # a document. You can then use content negotiation to give a browser a 
 
363
    # file in a language the user can understand.
 
364
    #
 
365
    # Specify a default language. This means that all data
 
366
    # going out without a specific language tag (see below) will 
 
367
    # be marked with this one. You probably do NOT want to set
 
368
    # this unless you are sure it is correct for all cases.
 
369
    #
 
370
    # * It is generally better to not mark a page as 
 
371
    # * being a certain language than marking it with the wrong
 
372
    # * language!
 
373
    #
 
374
    # DefaultLanguage nl
 
375
    #
 
376
    # Note 1: The suffix does not have to be the same as the language
 
377
    # keyword --- those with documents in Polish (whose net-standard
 
378
    # language code is pl) may wish to use "AddLanguage pl .po" to
 
379
    # avoid the ambiguity with the common suffix for perl scripts.
 
380
    #
 
381
    # Note 2: The example entries below illustrate that in some cases 
 
382
    # the two character 'Language' abbreviation is not identical to 
 
383
    # the two character 'Country' code for its country,
 
384
    # E.g. 'Danmark/dk' versus 'Danish/da'.
 
385
    #
 
386
    # Note 3: In the case of 'ltz' we violate the RFC by using a three char
 
387
    # specifier. There is 'work in progress' to fix this and get
 
388
    # the reference data for rfc1766 cleaned up.
 
389
    #
 
390
    # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl)
 
391
    # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de)
 
392
    # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja)
 
393
    # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn)
 
394
    # Norwegian (no) - Polish (pl) - Portugese (pt)
 
395
    # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv)
 
396
    # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW)
 
397
    #
 
398
    AddLanguage ca .ca
 
399
    AddLanguage cs .cz .cs
 
400
    AddLanguage da .dk
 
401
    AddLanguage de .de
 
402
    AddLanguage el .el
 
403
    AddLanguage en .en
 
404
    AddLanguage eo .eo
 
405
    AddLanguage es .es
 
406
    AddLanguage et .et
 
407
    AddLanguage fr .fr
 
408
    AddLanguage he .he
 
409
    AddLanguage hr .hr
 
410
    AddLanguage it .it
 
411
    AddLanguage ja .ja
 
412
    AddLanguage ko .ko
 
413
    AddLanguage ltz .ltz
 
414
    AddLanguage nl .nl
 
415
    AddLanguage nn .nn
 
416
    AddLanguage no .no
 
417
    AddLanguage pl .po
 
418
    AddLanguage pt .pt
 
419
    AddLanguage pt-BR .pt-br
 
420
    AddLanguage ru .ru
 
421
    AddLanguage sv .sv
 
422
    AddLanguage zh-CN .zh-cn
 
423
    AddLanguage zh-TW .zh-tw
 
424
</IfModule>
 
425
 
 
426
<IfModule mod_negotiation.c>
 
427
    #
 
428
    # LanguagePriority allows you to give precedence to some languages
 
429
    # in case of a tie during content negotiation.
 
430
    #
 
431
    # Just list the languages in decreasing order of preference. We have
 
432
    # more or less alphabetized them here. You probably want to change this.
 
433
    #
 
434
    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
 
435
 
 
436
    #
 
437
    # ForceLanguagePriority allows you to serve a result page rather than
 
438
    # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
 
439
    # [in case no accepted languages matched the available variants]
 
440
    #
 
441
    ForceLanguagePriority Prefer Fallback
 
442
 
 
443
</IfModule>
 
444
 
 
445
<IfModule mod_mime.c>
 
446
    #
 
447
    # Commonly used filename extensions to character sets. You probably
 
448
    # want to avoid clashes with the language extensions, unless you
 
449
    # are good at carefully testing your setup after each change.
 
450
    # See http://www.iana.org/assignments/character-sets for the
 
451
    # official list of charset names and their respective RFCs.
 
452
    #
 
453
    AddCharset us-ascii    .ascii .us-ascii
 
454
    AddCharset ISO-8859-1  .iso8859-1  .latin1
 
455
    AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
 
456
    AddCharset ISO-8859-3  .iso8859-3  .latin3
 
457
    AddCharset ISO-8859-4  .iso8859-4  .latin4
 
458
    AddCharset ISO-8859-5  .iso8859-5  .cyr .iso-ru
 
459
    AddCharset ISO-8859-6  .iso8859-6  .arb .arabic
 
460
    AddCharset ISO-8859-7  .iso8859-7  .grk .greek
 
461
    AddCharset ISO-8859-8  .iso8859-8  .heb .hebrew
 
462
    AddCharset ISO-8859-9  .iso8859-9  .latin5 .trk
 
463
    AddCharset ISO-8859-10  .iso8859-10  .latin6
 
464
    AddCharset ISO-8859-13  .iso8859-13
 
465
    AddCharset ISO-8859-14  .iso8859-14  .latin8
 
466
    AddCharset ISO-8859-15  .iso8859-15  .latin9
 
467
    AddCharset ISO-8859-16  .iso8859-16  .latin10
 
468
    AddCharset ISO-2022-JP .iso2022-jp .jis
 
469
    AddCharset ISO-2022-KR .iso2022-kr .kis
 
470
    AddCharset ISO-2022-CN .iso2022-cn .cis
 
471
    AddCharset Big5        .Big5       .big5 .b5
 
472
    AddCharset cn-Big5     .cn-big5
 
473
    # For russian, more than one charset is used (depends on client, mostly):
 
474
    AddCharset WINDOWS-1251 .cp-1251   .win-1251
 
475
    AddCharset CP866       .cp866
 
476
    AddCharset KOI8      .koi8
 
477
    AddCharset KOI8-E      .koi8-e
 
478
    AddCharset KOI8-r      .koi8-r .koi8-ru
 
479
    AddCharset KOI8-U      .koi8-u
 
480
    AddCharset KOI8-ru     .koi8-uk .ua
 
481
    AddCharset ISO-10646-UCS-2 .ucs2
 
482
    AddCharset ISO-10646-UCS-4 .ucs4
 
483
    AddCharset UTF-7       .utf7
 
484
    AddCharset UTF-8       .utf8
 
485
    AddCharset UTF-16      .utf16
 
486
    AddCharset UTF-16BE    .utf16be
 
487
    AddCharset UTF-16LE    .utf16le
 
488
    AddCharset UTF-32      .utf32
 
489
    AddCharset UTF-32BE    .utf32be
 
490
    AddCharset UTF-32LE    .utf32le
 
491
    AddCharset euc-cn      .euc-cn
 
492
    AddCharset euc-gb      .euc-gb
 
493
    AddCharset euc-jp      .euc-jp
 
494
    AddCharset euc-kr      .euc-kr
 
495
    #Not sure how euc-tw got in - IANA doesn't list it???
 
496
    AddCharset EUC-TW      .euc-tw
 
497
    AddCharset gb2312      .gb2312 .gb
 
498
    AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2
 
499
    AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4
 
500
    AddCharset shift_jis   .shift_jis .sjis
 
501
 
 
502
    #
 
503
    # AddHandler allows you to map certain file extensions to "handlers":
 
504
    # actions unrelated to filetype. These can be either built into the server
 
505
    # or added with the Action directive (see below)
 
506
    #
 
507
    # To use CGI scripts outside of ScriptAliased directories:
 
508
    # (You will also need to add "ExecCGI" to the "Options" directive.)
 
509
    #
 
510
    #AddHandler cgi-script .cgi
 
511
 
 
512
    #
 
513
    # For files that include their own HTTP headers:
 
514
    #
 
515
    #AddHandler send-as-is asis
 
516
 
 
517
    #
 
518
    # For server-parsed imagemap files:
 
519
    #
 
520
    #AddHandler imap-file map
 
521
 
 
522
    #
 
523
    # For type maps (negotiated resources):
 
524
    # (This is enabled by default to allow the Apache "It Worked" page
 
525
    #  to be distributed in multiple languages.)
 
526
    #
 
527
    AddHandler type-map var
 
528
 
 
529
    #
 
530
    # Filters allow you to process content before it is sent to the client.
 
531
    #
 
532
    # To parse .shtml files for server-side includes (SSI):
 
533
    # (You will also need to add "Includes" to the "Options" directive.)
 
534
    #
 
535
    AddType text/html .shtml
 
536
    AddOutputFilter INCLUDES .shtml
 
537
</IfModule>
 
538
 
 
539
#
 
540
# Action lets you define media types that will execute a script whenever
 
541
# a matching file is called. This eliminates the need for repeated URL
 
542
# pathnames for oft-used CGI file processors.
 
543
# Format: Action media/type /cgi-script/location
 
544
# Format: Action handler-name /cgi-script/location
 
545
#
 
546
 
 
547
#
 
548
# Customizable error responses come in three flavors:
 
549
# 1) plain text 2) local redirects 3) external redirects
 
550
#
 
551
# Some examples:
 
552
#ErrorDocument 500 "The server made a boo boo."
 
553
#ErrorDocument 404 /missing.html
 
554
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
 
555
#ErrorDocument 402 http://www.example.com/subscription_info.html
 
556
#
 
557
 
 
558
#
 
559
# Putting this all together, we can internationalize error responses.
 
560
#
 
561
# We use Alias to redirect any /error/HTTP_<error>.html.var response to
 
562
# our collection of by-error message multi-language collections.  We use 
 
563
# includes to substitute the appropriate text.
 
564
#
 
565
# You can modify the messages' appearance without changing any of the
 
566
# default HTTP_<error>.html.var files by adding the line:
 
567
#
 
568
#   Alias /error/include/ "/your/include/path/"
 
569
#
 
570
# which allows you to create your own set of files by starting with the
 
571
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/, 
 
572
# even on a per-VirtualHost basis.  The default include files will display
 
573
# your Apache version number and your ServerAdmin email address regardless
 
574
# of the setting of ServerSignature.
 
575
#
 
576
# The internationalized error documents require mod_alias, mod_include
 
577
# and mod_negotiation.  To activate them, uncomment the following 30 lines.
 
578
 
 
579
#    Alias /error/ "/usr/share/apache2/error/"
 
580
#
 
581
#    <Directory "/usr/share/apache2/error">
 
582
#        AllowOverride None
 
583
#        Options IncludesNoExec
 
584
#        AddOutputFilter Includes html
 
585
#        AddHandler type-map var
 
586
#        Order allow,deny
 
587
#        Allow from all
 
588
#        LanguagePriority en cs de es fr it nl sv pt-br ro
 
589
#        ForceLanguagePriority Prefer Fallback
 
590
#    </Directory>
 
591
#
 
592
#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
 
593
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
 
594
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
 
595
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
 
596
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
 
597
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
 
598
#    ErrorDocument 410 /error/HTTP_GONE.html.var
 
599
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
 
600
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
 
601
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
 
602
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
 
603
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
 
604
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
 
605
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
 
606
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
 
607
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
 
608
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
 
609
 
 
610
<IfModule mod_setenvif.c>
 
611
    #
 
612
    # The following directives modify normal HTTP response behavior to
 
613
    # handle known problems with browser implementations.
 
614
    #
 
615
    BrowserMatch "Mozilla/2" nokeepalive
 
616
    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
 
617
    BrowserMatch "RealPlayer 4\.0" force-response-1.0
 
618
    BrowserMatch "Java/1\.0" force-response-1.0
 
619
    BrowserMatch "JDK/1\.0" force-response-1.0
 
620
 
 
621
    #
 
622
    # The following directive disables redirects on non-GET requests for
 
623
    # a directory that does not include the trailing slash.  This fixes a 
 
624
    # problem with Microsoft WebFolders which does not appropriately handle 
 
625
    # redirects for folders with DAV methods.
 
626
    # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV.
 
627
    #
 
628
    BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
 
629
    BrowserMatch "^WebDrive" redirect-carefully
 
630
    BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
 
631
    BrowserMatch "^gnome-vfs/1.0" redirect-carefully
 
632
    BrowserMatch "^XML Spy" redirect-carefully
 
633
</IfModule>
 
634
 
 
635
#<IfModule mod_status.c>
 
636
    #
 
637
    # Allow server status reports generated by mod_status,
 
638
    # with the URL of http://servername/server-status
 
639
    # Change the ".example.com" to match your domain to enable.
 
640
    #
 
641
    #<Location /server-status>
 
642
    #    SetHandler server-status
 
643
    #    Order deny,allow
 
644
    #    Deny from all
 
645
    #    Allow from .example.com
 
646
    #</Location>
 
647
#</IfModule>
 
648
 
 
649
#<IfModule mod_info.c>
 
650
    #
 
651
    # Allow remote server configuration reports, with the URL of
 
652
    #  http://servername/server-info (requires that mod_info.c be loaded).
 
653
    # Change the ".example.com" to match your domain to enable.
 
654
    #
 
655
    #<Location /server-info>
 
656
    #    SetHandler server-info
 
657
    #    Order deny,allow
 
658
    #    Deny from all
 
659
    #    Allow from .example.com
 
660
    #</Location>
 
661
#</IfModule>
 
662
 
 
663
# Include the virtual host configurations:
 
664
Include /etc/apache2/sites-enabled/[^.#]*