source: projects/specs/trunk/a/apache2/httpd.conf @ 8063

Revision 8063, 33.0 KB checked in by Takemikaduchi, 10 years ago (diff)

merge spec file

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