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