]> git.pld-linux.org Git - packages/apache.git/blame - apache-httpd.conf
convert to utf8
[packages/apache.git] / apache-httpd.conf
CommitLineData
1fee6743 1# $Id$
9d781f9b
MM
2#
3# Based upon the NCSA server configuration files originally by Rob McCool.
4#
5# This is the main Apache server configuration file. It contains the
6# configuration directives that give the server its instructions.
7# See <URL:http://httpd.apache.org/docs-2.0/> for detailed information about
8# the directives.
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 "/foo.log"
29# with ServerRoot set to "/etc/httpd/httpd" will be interpreted by the
30# server as "/etc/httpd/httpd//foo.log".
31#
4af76ed4 32
9d781f9b
MM
33### Section 1: Global Environment
34#
4af76ed4 35# The directives in this section affect the overall operation of Apache,
9d781f9b
MM
36# such as the number of concurrent requests it can handle or where it
37# can find its configuration files.
38#
882960bb 39
9d781f9b
MM
40#
41# ServerRoot: The top of the directory tree under which the server's
42# configuration, error, and log files are kept.
4af76ed4 43#
44# NOTE! If you intend to place this on an NFS (or otherwise network)
45# mounted filesystem then please read the LockFile documentation
9d781f9b 46# (available at <URL:http://httpd.apache.org/docs-2.0/mod/core.html#lockfile>);
4af76ed4 47# you will save yourself a lot of trouble.
48#
49# Do NOT add a slash at the end of the directory path.
50#
60c726e0 51ServerRoot "/etc/httpd"
4af76ed4 52
4af76ed4 53#
9d781f9b
MM
54# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
55#
56<IfModule !mpm_winnt.c>
57<IfModule !mpm_netware.c>
58#LockFile /accept.lock
59</IfModule>
60</IfModule>
4af76ed4 61
9d781f9b
MM
62#
63# ScoreBoardFile: File used to store internal server process information.
64# If unspecified (the default), the scoreboard will be stored in an
65# anonymous shared memory segment, and will be unavailable to third-party
66# applications.
67# If specified, ensure that no two invocations of Apache share the same
68# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
69#
70<IfModule !mpm_netware.c>
71<IfModule !perchild.c>
72#ScoreBoardFile /apache_runtime_status
73</IfModule>
74</IfModule>
98393628 75
4af76ed4 76
77#
9d781f9b
MM
78# PidFile: The file in which the server should record its process
79# identification number when it starts.
4af76ed4 80#
9d781f9b
MM
81<IfModule !mpm_netware.c>
82PidFile /var/run/httpd.pid
83</IfModule>
4af76ed4 84
4af76ed4 85#
9d781f9b 86# Timeout: The number of seconds before receives and sends time out.
4af76ed4 87#
9d781f9b 88Timeout 300
4af76ed4 89
90#
9d781f9b
MM
91# KeepAlive: Whether or not to allow persistent connections (more than
92# one request per connection). Set to "Off" to deactivate.
4af76ed4 93#
9d781f9b 94KeepAlive On
4af76ed4 95
96#
9d781f9b
MM
97# MaxKeepAliveRequests: The maximum number of requests to allow
98# during a persistent connection. Set to 0 to allow an unlimited amount.
99# We recommend you leave this number high, for maximum performance.
4af76ed4 100#
9d781f9b 101MaxKeepAliveRequests 100
4af76ed4 102
103#
9d781f9b
MM
104# KeepAliveTimeout: Number of seconds to wait for the next request from the
105# same client on the same connection.
4af76ed4 106#
9d781f9b 107KeepAliveTimeout 15
4af76ed4 108
9d781f9b
MM
109##
110## Server-Pool Size Regulation (MPM specific)
111##
112
113# prefork MPM
114# StartServers: number of server processes to start
115# MinSpareServers: minimum number of server processes which are kept spare
116# MaxSpareServers: maximum number of server processes which are kept spare
117# MaxClients: maximum number of server processes allowed to start
118# MaxRequestsPerChild: maximum number of requests a server process serves
119<IfModule prefork.c>
120StartServers 5
121MinSpareServers 5
122MaxSpareServers 10
123MaxClients 150
124MaxRequestsPerChild 0
125</IfModule>
98393628 126
9d781f9b
MM
127# worker MPM
128# StartServers: initial number of server processes to start
129# MaxClients: maximum number of simultaneous client connections
130# MinSpareThreads: minimum number of worker threads which are kept spare
131# MaxSpareThreads: maximum number of worker threads which are kept spare
132# ThreadsPerChild: constant number of worker threads in each server process
133# MaxRequestsPerChild: maximum number of requests a server process serves
134<IfModule worker.c>
135StartServers 2
136MaxClients 150
137MinSpareThreads 25
138MaxSpareThreads 75
139ThreadsPerChild 25
140MaxRequestsPerChild 0
141</IfModule>
98393628 142
9d781f9b
MM
143# perchild MPM
144# NumServers: constant number of server processes
145# StartThreads: initial number of worker threads in each server process
146# MinSpareThreads: minimum number of worker threads which are kept spare
147# MaxSpareThreads: maximum number of worker threads which are kept spare
148# MaxThreadsPerChild: maximum number of worker threads in each server process
149# MaxRequestsPerChild: maximum number of connections per server process
150<IfModule perchild.c>
151NumServers 5
152StartThreads 5
153MinSpareThreads 5
154MaxSpareThreads 10
155MaxThreadsPerChild 20
156MaxRequestsPerChild 0
157</IfModule>
888bfdde 158
9d781f9b
MM
159# WinNT MPM
160# ThreadsPerChild: constant number of worker threads in the server process
161# MaxRequestsPerChild: maximum number of requests a server process serves
162<IfModule mpm_winnt.c>
163ThreadsPerChild 250
164MaxRequestsPerChild 0
165</IfModule>
4af76ed4 166
9d781f9b
MM
167# BeOS MPM
168# StartThreads: how many threads do we initially spawn?
169# MaxClients: max number of threads we can have (1 thread == 1 client)
170# MaxRequestsPerThread: maximum number of requests each thread will process
171<IfModule beos.c>
172StartThreads 10
173MaxClients 50
174MaxRequestsPerThread 10000
175</IfModule>
176
177# NetWare MPM
178# ThreadStackSize ...... Stack size allocated for each worker thread
179# StartThreads ......... Number of worker threads launched at server startup
180# MinSpareThreads ...... Minimum number of idle threads, to handle request spikes
181# MaxSpareThreads ...... Maximum number of idle threads
182# MaxThreads ........... Maximum number of worker threads alive at the same time
183# MaxRequestsPerChild .. Maximum number of requests a thread serves. It is
184# recommended that the default value of 0 be set for this
185# directive on NetWare. This will allow the thread to
186# continue to service requests indefinitely.
187<IfModule mpm_netware.c>
188ThreadStackSize 65536
189StartThreads 250
190MinSpareThreads 25
191MaxSpareThreads 250
192MaxThreads 1000
193MaxRequestsPerChild 0
194</IfModule>
4af76ed4 195
467ebaaa
AM
196# Metux MPM
197# StartThreads ......... Number of threads each child creates
198# MinSpareThreads ...... Minimum number of idle threads per child, to handle request spikes
199# MaxSpareThreads ...... Maximum number of idle threads per child
200# MaxThreadsmetuxmpm ... Maximum number of threads per child
201# Multiplexer .......... Specify an Multiplexer Child configuration
202# Processor ............ Specify a User and Group for a specific child process
203# AssignUserID ......... Tie a virtual host to a specific child process
204# ServerLimit .......... Maximum value of NumServers for this run of Apache
205# ThreadLimit .......... Maximum worker threads in a server for this run of Apache
206<IfModule metuxmpm.c>
207StartThreads 5
208MinSpareThreads 5
209MaxSpareThreads 10
210MaxRequestsPerChild 0
211Multiplexer "http" "http"
212</IfModule>
213
99ce08d7
AM
214# peruser MPM
215# MinSpareServers Minimum number of idle children, to handle request spikes
216# MaxProcessors Maximum number of processors per vhost
217# ServerLimit Maximum value of MaxClients for this run of Apache
218# Multiplexer Specify an Multiplexer Child configuration
219# Processor Specify a User and Group for a specific child process
220# ServerEnvironment Specify the server environment for this virtual host
221<IfModule peruser.c>
222MinSpareServers 5
223MaxProcessors 10
224MaxClients 150
225MaxRequestsPerChild 0
226
227Multiplexer "http" "http"
228
229# And for virtuals use:
230# Processor user group
231# Processor user group /home/services/httpd/chrootdir
232</IfModule>
233
9d781f9b
MM
234#
235# Listen: Allows you to bind Apache to specific IP addresses and/or
236# ports, in addition to the default. See also the <VirtualHost>
237# directive.
238#
239# Change this to Listen on specific IP addresses as shown below to
240# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
241#
242#Listen 12.34.56.78:80
243Listen 80
4af76ed4 244
9d781f9b
MM
245#
246# Dynamic Shared Object (DSO) Support
247#
248# To be able to use the functionality of a module which was built as a DSO you
249# have to place corresponding `LoadModule' lines at this location so the
250# directives contained in it are actually available _before_ they are used.
251# Statically compiled modules (those listed by `httpd -l') do not need
252# to be loaded here.
94286b8b 253#
254# Example:
9d781f9b
MM
255#
256#
60c726e0
AM
257LoadModule access_module modules/mod_access.so
258LoadModule alias_module modules/mod_alias.so
259LoadModule asis_module modules/mod_asis.so
60c726e0
AM
260LoadModule cern_meta_module modules/mod_cern_meta.so
261LoadModule cgi_module modules/mod_cgi.so
262LoadModule env_module modules/mod_env.so
263LoadModule include_module modules/mod_include.so
264LoadModule log_config_module modules/mod_log_config.so
265LoadModule mime_magic_module modules/mod_mime_magic.so
266LoadModule mime_module modules/mod_mime.so
267LoadModule negotiation_module modules/mod_negotiation.so
268LoadModule setenvif_module modules/mod_setenvif.so
269LoadModule speling_module modules/mod_speling.so
270LoadModule userdir_module modules/mod_userdir.so
9d781f9b
MM
271
272# ExtendedStatus controls whether Apache will generate "full" status
273# information (ExtendedStatus On) or just basic information (ExtendedStatus
274# Off) when the "server-status" handler is called. The default is Off.
275#
a6c476d8 276#ExtendedStatus On
277
9d781f9b 278### Section 2: 'Main' server configuration
4af76ed4 279#
280# The directives in this section set up the values used by the 'main'
281# server, which responds to any requests that aren't handled by a
282# <VirtualHost> definition. These values also provide defaults for
283# any <VirtualHost> containers you may define later in the file.
284#
285# All of these directives may appear inside <VirtualHost> containers,
286# in which case these default settings will be overridden for the
287# virtual host being defined.
288#
289
9d781f9b
MM
290<IfModule !mpm_winnt.c>
291<IfModule !mpm_netware.c>
4af76ed4 292#
293# If you wish httpd to run as a different user or group, you must run
294# httpd as root initially and it will switch.
295#
9d781f9b
MM
296# User/Group: The name (or #number) of the user/group to run httpd as.
297# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
298# . On HPUX you may not be able to use shared memory as nobody, and the
299# suggested workaround is to create a user www and use that user.
300# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
301# when the value of (unsigned)Group is above 60000;
302# don't use Group #-1 on these systems!
303#
304User http
4af76ed4 305Group http
9d781f9b
MM
306</IfModule>
307</IfModule>
4af76ed4 308
309#
310# ServerAdmin: Your address, where problems with the server should be
311# e-mailed. This address appears on some server-generated pages, such
9d781f9b 312# as error documents. e.g. admin@your-domain.com
4af76ed4 313#
9d781f9b 314ServerAdmin you@your.address
4af76ed4 315
316#
9d781f9b
MM
317# ServerName gives the name and port that the server uses to identify itself.
318# This can often be determined automatically, but we recommend you specify
319# it explicitly to prevent problems during startup.
320#
321# If this is not set to valid DNS name for your host, server-generated
322# redirections will not work. See also the UseCanonicalName directive.
4af76ed4 323#
4af76ed4 324# If your host doesn't have a registered DNS name, enter its IP address here.
9d781f9b
MM
325# You will have to access it by its address anyway, and this will make
326# redirections work in a sensible way.
327#
328#ServerName new.host.name:80
329
4af76ed4 330#
9d781f9b
MM
331# UseCanonicalName: Determines how Apache constructs self-referencing
332# URLs and the SERVER_NAME and SERVER_PORT variables.
333# When set "Off", Apache will use the Hostname and Port supplied
334# by the client. When set "On", Apache will use the value of the
335# ServerName directive.
888bfdde 336#
9d781f9b 337UseCanonicalName Off
4af76ed4 338
339#
340# DocumentRoot: The directory out of which you will serve your
341# documents. By default, all requests are taken from this directory, but
342# symbolic links and aliases may be used to point to other locations.
343#
38106dd6 344DocumentRoot "/home/services/httpd/html"
4af76ed4 345
346#
9d781f9b 347# Each directory to which Apache has access can be configured with respect
4af76ed4 348# to which services and features are allowed and/or disabled in that
349# directory (and its subdirectories).
350#
351# First, we configure the "default" to be a very restrictive set of
9d781f9b 352# features.
4af76ed4 353#
354<Directory />
9d781f9b
MM
355 Options FollowSymLinks
356 AllowOverride None
4af76ed4 357</Directory>
358
359#
360# Note that from this point forward you must specifically allow
361# particular features to be enabled - so if something's not working as
362# you might expect, make sure that you have specifically enabled it
363# below.
364#
365
366#
367# This should be changed to whatever you set DocumentRoot to.
368#
38106dd6 369<Directory "/home/services/httpd/html">
4af76ed4 370
371#
9d781f9b
MM
372# Possible values for the Options directive are "None", "All",
373# or any combination of:
374# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
4af76ed4 375#
376# Note that "MultiViews" must be named *explicitly* --- "Options All"
377# doesn't give it to you.
378#
9d781f9b
MM
379# The Options directive is both complicated and important. Please see
380# http://httpd.apache.org/docs-2.0/mod/core.html#options
381# for more information.
382#
383 Options Indexes FollowSymLinks
4af76ed4 384
385#
9d781f9b
MM
386# AllowOverride controls what directives may be placed in .htaccess files.
387# It can be "All", "None", or any combination of the keywords:
388# Options FileInfo AuthConfig Limit
4af76ed4 389#
9d781f9b 390 AllowOverride None
4af76ed4 391
392#
393# Controls who can get stuff from this server.
394#
9d781f9b
MM
395 Order allow,deny
396 Allow from all
397
4af76ed4 398</Directory>
399
400#
9d781f9b 401# UserDir: The name of the directory that is appended onto a user's home
4af76ed4 402# directory if a ~user request is received.
403#
404UserDir public_html
405
406#
407# Control access to UserDir directories. The following is an example
408# for a site where these directories are restricted to read-only.
409#
247aee9d 410#<Directory /home/users/*/public_html>
4af76ed4 411# AllowOverride FileInfo AuthConfig Limit
412# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
413# <Limit GET POST OPTIONS PROPFIND>
414# Order allow,deny
415# Allow from all
416# </Limit>
888bfdde 417# <LimitExcept GET POST OPTIONS PROPFIND>
4af76ed4 418# Order deny,allow
419# Deny from all
48184c11 420# </LimitExcept>
4af76ed4 421#</Directory>
422
4af76ed4 423#
424# AccessFileName: The name of the file to look for in each directory
9d781f9b 425# for access control information. See also the AllowOverride directive.
4af76ed4 426#
427AccessFileName .htaccess
428
429#
9d781f9b
MM
430# The following lines prevent .htaccess and .htpasswd files from being
431# viewed by Web clients.
888bfdde
JB
432#
433<Files ~ "^\.ht">
9d781f9b
MM
434 Order allow,deny
435 Deny from all
4af76ed4 436</Files>
437
4af76ed4 438#
439# TypesConfig describes where the mime.types file (or equivalent) is
9d781f9b 440# to be found.
4af76ed4 441#
442TypesConfig /etc/mime.types
443
444#
445# DefaultType is the default MIME type the server will use for a document
446# if it cannot otherwise determine one, such as from filename extensions.
447# If your server contains mostly text or HTML documents, "text/plain" is
448# a good value. If most of your content is binary, such as applications
449# or images, you may want to use "application/octet-stream" instead to
450# keep browsers from trying to display binary files as though they are
451# text.
452#
453DefaultType text/plain
454
455#
456# The mod_mime_magic module allows the server to use various hints from the
457# contents of the file itself to determine its type. The MIMEMagicFile
458# directive tells the module where the hint definitions are located.
4af76ed4 459#
460<IfModule mod_mime_magic.c>
9d781f9b 461 MIMEMagicFile /etc/httpd/magic
4af76ed4 462</IfModule>
463
464#
465# HostnameLookups: Log the names of clients or just their IP addresses
466# e.g., www.apache.org (on) or 204.62.129.132 (off).
467# The default is off because it'd be overall better for the net if people
468# had to knowingly turn this feature on, since enabling it means that
469# each client request will result in AT LEAST one lookup request to the
470# nameserver.
471#
472HostnameLookups Off
473
9d781f9b
MM
474#
475# ErrorLog: The location of the error log file.
476# If you do not specify an ErrorLog directive within a <VirtualHost>
477# container, error messages relating to that virtual host will be
478# logged here. If you *do* define an error logfile for a <VirtualHost>
479# container, that host's errors will be logged there and not here.
480#
481ErrorLog /var/log/httpd/error_log
482
483#
484# LogLevel: Control the number of messages logged to the error_log.
485# Possible values include: debug, info, notice, warn, error, crit,
486# alert, emerg.
487#
488LogLevel warn
489
4af76ed4 490#
491# The following directives define some format nicknames for use with
492# a CustomLog directive (see below).
493#
494LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
495LogFormat "%h %l %u %t \"%r\" %>s %b" common
496LogFormat "%{Referer}i -> %U" referer
497LogFormat "%{User-agent}i" agent
498
499#
500# The location and format of the access logfile (Common Logfile Format).
501# If you do not define any access logfiles within a <VirtualHost>
502# container, they will be logged here. Contrariwise, if you *do*
503# define per-<VirtualHost> access logfiles, transactions will be
504# logged therein and *not* in this file.
505#
506CustomLog /var/log/httpd/access_log common
4af76ed4 507
508#
9d781f9b
MM
509# If you would like to have agent and referer logfiles, uncomment the
510# following directives.
4af76ed4 511#
9d781f9b
MM
512#CustomLog /var/log/httpd/referer_log referer
513#CustomLog /var/log/httpd/agent_log agent
514
515#
516# If you prefer a single logfile with access, agent, and referer information
517# (Combined Logfile Format) you can use the following directive.
518#
519#CustomLog /var/log/httpd/access_log combined
4af76ed4 520
521#
522# Optionally add a line containing the server version and virtual host
523# name to server-generated pages (error documents, FTP directory listings,
524# mod_status and mod_info output etc., but not CGI generated documents).
525# Set to "EMail" to also include a mailto: link to the ServerAdmin.
526# Set to one of: On | Off | EMail
527#
9d781f9b 528ServerSignature On
c9637d56 529#ServerTokens Prod
4af76ed4 530
531#
532# Aliases: Add here as many aliases as you need (with no limit). The format is
533# Alias fakename realname
534#
535# Note that if you include a trailing / on fakename then the server will
536# require it to be present in the URL. So "/icons" isn't aliased in this
9d781f9b
MM
537# example, only "/icons/". If the fakename is slash-terminated, then the
538# realname must also be slash terminated, and if the fakename omits the
539# trailing slash, the realname must also omit it.
540#
541# We include the /icons/ alias for FancyIndexed directory listings. If you
542# do not use FancyIndexing, you may comment this out.
4af76ed4 543#
38106dd6 544Alias /icons/ "/home/services/httpd/icons/"
4af76ed4 545
38106dd6 546<Directory "/home/services/httpd/icons/">
9d781f9b
MM
547 Options Indexes MultiViews
548 AllowOverride None
549 Order allow,deny
550 Allow from all
1d3d2b1b 551</Directory>
4af76ed4 552
9d781f9b
MM
553#
554# This should be changed to the ServerRoot/manual/. The alias provides
555# the manual, even if you choose to move your DocumentRoot. You may comment
556# this out if you do not care for the documentation.
557#
38106dd6 558Alias /manual "/home/services/httpd/manual/"
77d023d2 559
38106dd6 560<Directory "/home/services/httpd/manual/">
9d781f9b
MM
561 Options Indexes FollowSymLinks MultiViews
562 AllowOverride None
563 Order allow,deny
564 Allow from all
77d023d2 565</Directory>
566
4af76ed4 567#
568# ScriptAlias: This controls which directories contain server scripts.
569# ScriptAliases are essentially the same as Aliases, except that
570# documents in the realname directory are treated as applications and
571# run by the server when requested rather than as documents sent to the client.
572# The same rules about trailing "/" apply to ScriptAlias directives as to
573# Alias.
574#
38106dd6 575ScriptAlias /cgi-bin/ "/home/services/httpd/cgi-bin/"
9d781f9b
MM
576
577<IfModule mod_cgid.c>
578#
579# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
580# for setting UNIX socket for communicating with cgid.
581#
582#Scriptsock /var/run/apache/cgisock
583</IfModule>
4af76ed4 584
585#
38106dd6 586# "/home/services/httpd/cgi-bin/" should be changed to whatever your ScriptAliased
4af76ed4 587# CGI directory exists, if you have that configured.
588#
38106dd6 589<Directory "/home/services/httpd/cgi-bin/">
9d781f9b
MM
590 AllowOverride None
591 Options None
592 Order allow,deny
593 Allow from all
4af76ed4 594</Directory>
595
596#
597# Redirect allows you to tell clients about documents which used to exist in
598# your server's namespace, but do not anymore. This allows you to tell the
599# clients where to look for the relocated document.
9d781f9b
MM
600# Example:
601# Redirect permanent /foo http://www.example.com/bar
4af76ed4 602
603#
271f142c
JB
604# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
605# information on the fly. Note: Not all browsers support this.
606# Despite the name similarity, the following Add* directives have nothing
607# to do with the FancyIndexing customization directives above.
4af76ed4 608#
271f142c
JB
609AddEncoding x-compress Z
610AddEncoding x-gzip gz tgz
c3df68ce 611
4af76ed4 612#
9d781f9b
MM
613# DefaultLanguage and AddLanguage allows you to specify the language of
614# a document. You can then use content negotiation to give a browser a
615# file in a language the user can understand.
616#
617# Specify a default language. This means that all data
618# going out without a specific language tag (see below) will
619# be marked with this one. You probably do NOT want to set
620# this unless you are sure it is correct for all cases.
621#
622# * It is generally better to not mark a page as
623# * being a certain language than marking it with the wrong
624# * language!
625#
626# DefaultLanguage nl
888bfdde
JB
627#
628# Note 1: The suffix does not have to be the same as the language
629# keyword --- those with documents in Polish (whose net-standard
630# language code is pl) may wish to use "AddLanguage pl .po" to
631# avoid the ambiguity with the common suffix for perl scripts.
632#
9d781f9b
MM
633# Note 2: The example entries below illustrate that in some cases
634# the two character 'Language' abbreviation is not identical to
635# the two character 'Country' code for its country,
888bfdde
JB
636# E.g. 'Danmark/dk' versus 'Danish/da'.
637#
638# Note 3: In the case of 'ltz' we violate the RFC by using a three char
9d781f9b 639# specifier. There is 'work in progress' to fix this and get
888bfdde
JB
640# the reference data for rfc1766 cleaned up.
641#
9d781f9b 642# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
888bfdde 643# French (fr) - German (de) - Greek-Modern (el)
9d781f9b 644# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)
888bfdde
JB
645# Portugese (pt) - Luxembourgeois* (ltz)
646# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
647# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
9d781f9b 648# Russian (ru) - Croatian (hr)
888bfdde 649#
888bfdde 650AddLanguage da .dk
9d781f9b 651AddLanguage nl .nl
888bfdde 652AddLanguage en .en
9d781f9b 653AddLanguage et .et
888bfdde 654AddLanguage fr .fr
9d781f9b 655AddLanguage de .de
888bfdde 656AddLanguage he .he
9d781f9b 657AddLanguage el .el
4af76ed4 658AddLanguage it .it
888bfdde 659AddLanguage ja .ja
9d781f9b 660AddLanguage pl .po
888bfdde 661AddLanguage kr .kr
9d781f9b 662AddLanguage pt .pt
48184c11 663AddLanguage nn .nn
888bfdde 664AddLanguage no .no
888bfdde 665AddLanguage pt-br .pt-br
9d781f9b
MM
666AddLanguage ltz .ltz
667AddLanguage ca .ca
668AddLanguage es .es
669AddLanguage sv .se
670AddLanguage cz .cz
888bfdde 671AddLanguage ru .ru
888bfdde 672AddLanguage tw .tw
48184c11 673AddLanguage zh-tw .tw
9d781f9b 674AddLanguage hr .hr
888bfdde 675
4af76ed4 676#
677# LanguagePriority allows you to give precedence to some languages
678# in case of a tie during content negotiation.
4af76ed4 679#
9d781f9b
MM
680# Just list the languages in decreasing order of preference. We have
681# more or less alphabetized them here. You probably want to change this.
682#
683LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw
4af76ed4 684
888bfdde 685#
9d781f9b
MM
686# ForceLanguagePriority allows you to serve a result page rather than
687# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
688# [in case no accepted languages matched the available variants]
888bfdde 689#
9d781f9b
MM
690ForceLanguagePriority Prefer Fallback
691
888bfdde 692#
9d781f9b
MM
693# Specify a default charset for all pages sent out. This is
694# always a good idea and opens the door for future internationalisation
695# of your web site, should you ever want it. Specifying it as
696# a default does little harm; as the standard dictates that a page
697# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
698# are merely stating the obvious. There are also some security
699# reasons in browsers, related to javascript and URL parsing
700# which encourage you to always set a default char set.
888bfdde 701#
84cf554f
MM
702#AddDefaultCharset ISO-8859-2
703AddDefaultCharset Off
9d781f9b 704
888bfdde 705#
9d781f9b
MM
706# Commonly used filename extensions to character sets. You probably
707# want to avoid clashes with the language extensions, unless you
708# are good at carefully testing your setup after each change.
709# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets for
710# the official list of charset names and their respective RFCs
888bfdde 711#
9d781f9b
MM
712AddCharset ISO-8859-1 .iso8859-1 .latin1
713AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
714AddCharset ISO-8859-3 .iso8859-3 .latin3
715AddCharset ISO-8859-4 .iso8859-4 .latin4
716AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
717AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
718AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
719AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
720AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
721AddCharset ISO-2022-JP .iso2022-jp .jis
722AddCharset ISO-2022-KR .iso2022-kr .kis
723AddCharset ISO-2022-CN .iso2022-cn .cis
724AddCharset Big5 .Big5 .big5
725# For russian, more than one charset is used (depends on client, mostly):
726AddCharset WINDOWS-1251 .cp-1251 .win-1251
727AddCharset CP866 .cp866
728AddCharset KOI8-r .koi8-r .koi8-ru
729AddCharset KOI8-ru .koi8-uk .ua
730AddCharset ISO-10646-UCS-2 .ucs2
731AddCharset ISO-10646-UCS-4 .ucs4
732AddCharset UTF-8 .utf8
888bfdde 733
9d781f9b
MM
734# The set below does not map to a specific (iso) standard
735# but works on a fairly wide range of browsers. Note that
736# capitalization actually matters (it should not, but it
737# does for some browsers).
4af76ed4 738#
9d781f9b
MM
739# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
740# for a list of sorts. But browsers support few.
4af76ed4 741#
9d781f9b
MM
742AddCharset GB2312 .gb2312 .gb
743AddCharset utf-7 .utf7
744AddCharset utf-8 .utf8
745AddCharset big5 .big5 .b5
746AddCharset EUC-TW .euc-tw
747AddCharset EUC-JP .euc-jp
748AddCharset EUC-KR .euc-kr
749AddCharset shift_jis .sjis
750
4af76ed4 751#
9d781f9b
MM
752# AddType allows you to add to or override the MIME configuration
753# file mime.types for specific file types.
4af76ed4 754#
9d781f9b 755AddType application/x-tar .tgz
4af76ed4 756
757#
9d781f9b
MM
758# AddHandler allows you to map certain file extensions to "handlers":
759# actions unrelated to filetype. These can be either built into the server
760# or added with the Action directive (see below)
4af76ed4 761#
9d781f9b
MM
762# To use CGI scripts outside of ScriptAliased directories:
763# (You will also need to add "ExecCGI" to the "Options" directive.)
764#
765#AddHandler cgi-script .cgi
4af76ed4 766
767#
9d781f9b 768# For files that include their own HTTP headers:
4af76ed4 769#
9d781f9b 770#AddHandler send-as-is asis
4af76ed4 771
772#
9d781f9b 773# For server-parsed imagemap files:
4af76ed4 774#
9d781f9b 775#AddHandler imap-file map
4af76ed4 776
777#
9d781f9b
MM
778# For type maps (negotiated resources):
779# (This is enabled by default to allow the Apache "It Worked" page
780# to be distributed in multiple languages.)
4af76ed4 781#
782AddHandler type-map var
783
9d781f9b
MM
784# Filters allow you to process content before it is sent to the client.
785#
786# To parse .shtml files for server-side includes (SSI):
787# (You will also need to add "Includes" to the "Options" directive.)
788#
789#AddOutputFilter INCLUDES .shtml
790
4af76ed4 791#
792# Action lets you define media types that will execute a script whenever
793# a matching file is called. This eliminates the need for repeated URL
794# pathnames for oft-used CGI file processors.
795# Format: Action media/type /cgi-script/location
796# Format: Action handler-name /cgi-script/location
797#
798
799#
9d781f9b
MM
800# Customizable error responses come in three flavors:
801# 1) plain text 2) local redirects 3) external redirects
4af76ed4 802#
9d781f9b
MM
803# Some examples:
804#ErrorDocument 500 "The server made a boo boo."
4af76ed4 805#ErrorDocument 404 /missing.html
9d781f9b
MM
806#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
807#ErrorDocument 402 http://www.example.com/subscription_info.html
808#
809
810#
811# Putting this all together, we can Internationalize error responses.
812#
813# We use Alias to redirect any /error/HTTP_<error>.html.var response to
814# our collection of by-error message multi-language collections. We use
815# includes to substitute the appropriate text.
816#
817# You can modify the messages' appearance without changing any of the
818# default HTTP_<error>.html.var files by adding the line;
819#
820# Alias /error/include/ "/your/include/path/"
821#
822# which allows you to create your own set of files by starting with the
823# /etc/httpd/httpd//include/ files and
824# copying them to /your/include/path/, even on a per-VirtualHost basis.
825#
826
827<IfModule mod_negotiation.c>
828<IfModule mod_include.c>
38106dd6 829 Alias /error/ "/home/services/httpd/error/"
9d781f9b 830
38106dd6 831 <Directory "/home/services/httpd/error/">
9d781f9b
MM
832 AllowOverride None
833 Options IncludesNoExec
834 AddOutputFilter Includes html
835 AddHandler type-map var
836 Order allow,deny
837 Allow from all
838 LanguagePriority en es de fr
839 ForceLanguagePriority Prefer Fallback
840 </Directory>
841
842 ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
843 ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
844 ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
845 ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
846 ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
847 ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
848 ErrorDocument 410 /error/HTTP_GONE.html.var
849 ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
850 ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
851 ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
852 ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
853 ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
854 ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
855 ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
856 ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
857 ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
858 ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
7745b7bc 859
9d781f9b
MM
860</IfModule>
861</IfModule>
52e4c839 862
ac2899f4 863<IfModule mod_setenvif.c>
9d781f9b
MM
864#
865# The following directives modify normal HTTP response behavior to
866# handle known problems with browser implementations.
4af76ed4 867#
ac2899f4 868 BrowserMatch "Mozilla/2" nokeepalive
869 BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
870 BrowserMatch "RealPlayer 4\.0" force-response-1.0
871 BrowserMatch "Java/1\.0" force-response-1.0
872 BrowserMatch "JDK/1\.0" force-response-1.0
4af76ed4 873#
9d781f9b
MM
874# The following directive disables redirects on non-GET requests for
875# a directory that does not include the trailing slash. This fixes a
876# problem with Microsoft WebFolders which does not appropriately handle
877# redirects for folders with DAV methods.
4af76ed4 878#
ac2899f4 879 BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
880 BrowserMatch "^WebDrive" redirect-carefully
881 BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
882 BrowserMatch "^gnome-vfs" redirect-carefully
883</IfModule>
884
ee5a8932
ER
885# include webapps configs
886Include webapps.d/*.conf
887
1fee6743 888# vim: filetype=apache ts=4 sw=4 et
This page took 0.264303 seconds and 4 git commands to generate.