]> git.pld-linux.org Git - packages/apache.git/blame - apache-httpd.conf
- not only function name changed but number of parameters, too - fixed
[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#
88756def 50ServerRoot "/usr"
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
9d781f9b
MM
195#
196# Listen: Allows you to bind Apache to specific IP addresses and/or
197# ports, in addition to the default. See also the <VirtualHost>
198# directive.
199#
200# Change this to Listen on specific IP addresses as shown below to
201# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
202#
203#Listen 12.34.56.78:80
204Listen 80
4af76ed4 205
9d781f9b
MM
206#
207# Dynamic Shared Object (DSO) Support
208#
209# To be able to use the functionality of a module which was built as a DSO you
210# have to place corresponding `LoadModule' lines at this location so the
211# directives contained in it are actually available _before_ they are used.
212# Statically compiled modules (those listed by `httpd -l') do not need
213# to be loaded here.
94286b8b 214#
215# Example:
9d781f9b
MM
216#
217#
88756def 218LoadModule access_module lib/apache/mod_access.so
219LoadModule alias_module lib/apache/mod_alias.so
220LoadModule asis_module lib/apache/mod_asis.so
221LoadModule autoindex_module lib/apache/mod_autoindex.so
222LoadModule cern_meta_module lib/apache/mod_cern_meta.so
223LoadModule cgi_module lib/apache/mod_cgi.so
224LoadModule env_module lib/apache/mod_env.so
225LoadModule include_module lib/apache/mod_include.so
226LoadModule log_config_module lib/apache/mod_log_config.so
227LoadModule mime_magic_module lib/apache/mod_mime_magic.so
228LoadModule mime_module lib/apache/mod_mime.so
229LoadModule negotiation_module lib/apache/mod_negotiation.so
230LoadModule setenvif_module lib/apache/mod_setenvif.so
231LoadModule speling_module lib/apache/mod_speling.so
232LoadModule userdir_module lib/apache/mod_userdir.so
9d781f9b
MM
233
234# ExtendedStatus controls whether Apache will generate "full" status
235# information (ExtendedStatus On) or just basic information (ExtendedStatus
236# Off) when the "server-status" handler is called. The default is Off.
237#
a6c476d8 238#ExtendedStatus On
239
9d781f9b 240### Section 2: 'Main' server configuration
4af76ed4 241#
242# The directives in this section set up the values used by the 'main'
243# server, which responds to any requests that aren't handled by a
244# <VirtualHost> definition. These values also provide defaults for
245# any <VirtualHost> containers you may define later in the file.
246#
247# All of these directives may appear inside <VirtualHost> containers,
248# in which case these default settings will be overridden for the
249# virtual host being defined.
250#
251
9d781f9b
MM
252<IfModule !mpm_winnt.c>
253<IfModule !mpm_netware.c>
4af76ed4 254#
255# If you wish httpd to run as a different user or group, you must run
256# httpd as root initially and it will switch.
257#
9d781f9b
MM
258# User/Group: The name (or #number) of the user/group to run httpd as.
259# . On SCO (ODT 3) use "User nouser" and "Group nogroup".
260# . On HPUX you may not be able to use shared memory as nobody, and the
261# suggested workaround is to create a user www and use that user.
262# NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
263# when the value of (unsigned)Group is above 60000;
264# don't use Group #-1 on these systems!
265#
266User http
4af76ed4 267Group http
9d781f9b
MM
268</IfModule>
269</IfModule>
4af76ed4 270
271#
272# ServerAdmin: Your address, where problems with the server should be
273# e-mailed. This address appears on some server-generated pages, such
9d781f9b 274# as error documents. e.g. admin@your-domain.com
4af76ed4 275#
9d781f9b 276ServerAdmin you@your.address
4af76ed4 277
278#
9d781f9b
MM
279# ServerName gives the name and port that the server uses to identify itself.
280# This can often be determined automatically, but we recommend you specify
281# it explicitly to prevent problems during startup.
282#
283# If this is not set to valid DNS name for your host, server-generated
284# redirections will not work. See also the UseCanonicalName directive.
4af76ed4 285#
4af76ed4 286# If your host doesn't have a registered DNS name, enter its IP address here.
9d781f9b
MM
287# You will have to access it by its address anyway, and this will make
288# redirections work in a sensible way.
289#
290#ServerName new.host.name:80
291
4af76ed4 292#
9d781f9b
MM
293# UseCanonicalName: Determines how Apache constructs self-referencing
294# URLs and the SERVER_NAME and SERVER_PORT variables.
295# When set "Off", Apache will use the Hostname and Port supplied
296# by the client. When set "On", Apache will use the value of the
297# ServerName directive.
888bfdde 298#
9d781f9b 299UseCanonicalName Off
4af76ed4 300
301#
302# DocumentRoot: The directory out of which you will serve your
303# documents. By default, all requests are taken from this directory, but
304# symbolic links and aliases may be used to point to other locations.
305#
9d781f9b 306DocumentRoot "/home/services/httpd/html"
4af76ed4 307
308#
9d781f9b 309# Each directory to which Apache has access can be configured with respect
4af76ed4 310# to which services and features are allowed and/or disabled in that
311# directory (and its subdirectories).
312#
313# First, we configure the "default" to be a very restrictive set of
9d781f9b 314# features.
4af76ed4 315#
316<Directory />
9d781f9b
MM
317 Options FollowSymLinks
318 AllowOverride None
4af76ed4 319</Directory>
320
321#
322# Note that from this point forward you must specifically allow
323# particular features to be enabled - so if something's not working as
324# you might expect, make sure that you have specifically enabled it
325# below.
326#
327
328#
329# This should be changed to whatever you set DocumentRoot to.
330#
9d781f9b 331<Directory "/home/services/httpd/html">
4af76ed4 332
333#
9d781f9b
MM
334# Possible values for the Options directive are "None", "All",
335# or any combination of:
336# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews
4af76ed4 337#
338# Note that "MultiViews" must be named *explicitly* --- "Options All"
339# doesn't give it to you.
340#
9d781f9b
MM
341# The Options directive is both complicated and important. Please see
342# http://httpd.apache.org/docs-2.0/mod/core.html#options
343# for more information.
344#
345 Options Indexes FollowSymLinks
4af76ed4 346
347#
9d781f9b
MM
348# AllowOverride controls what directives may be placed in .htaccess files.
349# It can be "All", "None", or any combination of the keywords:
350# Options FileInfo AuthConfig Limit
4af76ed4 351#
9d781f9b 352 AllowOverride None
4af76ed4 353
354#
355# Controls who can get stuff from this server.
356#
9d781f9b
MM
357 Order allow,deny
358 Allow from all
359
4af76ed4 360</Directory>
361
362#
9d781f9b 363# UserDir: The name of the directory that is appended onto a user's home
4af76ed4 364# directory if a ~user request is received.
365#
366UserDir public_html
367
368#
369# Control access to UserDir directories. The following is an example
370# for a site where these directories are restricted to read-only.
371#
9d781f9b 372#<Directory /home/*/public_html>
4af76ed4 373# AllowOverride FileInfo AuthConfig Limit
374# Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
375# <Limit GET POST OPTIONS PROPFIND>
376# Order allow,deny
377# Allow from all
378# </Limit>
888bfdde 379# <LimitExcept GET POST OPTIONS PROPFIND>
4af76ed4 380# Order deny,allow
381# Deny from all
48184c11 382# </LimitExcept>
4af76ed4 383#</Directory>
384
4af76ed4 385#
386# AccessFileName: The name of the file to look for in each directory
9d781f9b 387# for access control information. See also the AllowOverride directive.
4af76ed4 388#
389AccessFileName .htaccess
390
391#
9d781f9b
MM
392# The following lines prevent .htaccess and .htpasswd files from being
393# viewed by Web clients.
888bfdde
JB
394#
395<Files ~ "^\.ht">
9d781f9b
MM
396 Order allow,deny
397 Deny from all
4af76ed4 398</Files>
399
4af76ed4 400#
401# TypesConfig describes where the mime.types file (or equivalent) is
9d781f9b 402# to be found.
4af76ed4 403#
404TypesConfig /etc/mime.types
405
406#
407# DefaultType is the default MIME type the server will use for a document
408# if it cannot otherwise determine one, such as from filename extensions.
409# If your server contains mostly text or HTML documents, "text/plain" is
410# a good value. If most of your content is binary, such as applications
411# or images, you may want to use "application/octet-stream" instead to
412# keep browsers from trying to display binary files as though they are
413# text.
414#
415DefaultType text/plain
416
417#
418# The mod_mime_magic module allows the server to use various hints from the
419# contents of the file itself to determine its type. The MIMEMagicFile
420# directive tells the module where the hint definitions are located.
4af76ed4 421#
422<IfModule mod_mime_magic.c>
9d781f9b 423 MIMEMagicFile /etc/httpd/magic
4af76ed4 424</IfModule>
425
426#
427# HostnameLookups: Log the names of clients or just their IP addresses
428# e.g., www.apache.org (on) or 204.62.129.132 (off).
429# The default is off because it'd be overall better for the net if people
430# had to knowingly turn this feature on, since enabling it means that
431# each client request will result in AT LEAST one lookup request to the
432# nameserver.
433#
434HostnameLookups Off
435
9d781f9b
MM
436#
437# ErrorLog: The location of the error log file.
438# If you do not specify an ErrorLog directive within a <VirtualHost>
439# container, error messages relating to that virtual host will be
440# logged here. If you *do* define an error logfile for a <VirtualHost>
441# container, that host's errors will be logged there and not here.
442#
443ErrorLog /var/log/httpd/error_log
444
445#
446# LogLevel: Control the number of messages logged to the error_log.
447# Possible values include: debug, info, notice, warn, error, crit,
448# alert, emerg.
449#
450LogLevel warn
451
4af76ed4 452#
453# The following directives define some format nicknames for use with
454# a CustomLog directive (see below).
455#
456LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
457LogFormat "%h %l %u %t \"%r\" %>s %b" common
458LogFormat "%{Referer}i -> %U" referer
459LogFormat "%{User-agent}i" agent
460
461#
462# The location and format of the access logfile (Common Logfile Format).
463# If you do not define any access logfiles within a <VirtualHost>
464# container, they will be logged here. Contrariwise, if you *do*
465# define per-<VirtualHost> access logfiles, transactions will be
466# logged therein and *not* in this file.
467#
468CustomLog /var/log/httpd/access_log common
4af76ed4 469
470#
9d781f9b
MM
471# If you would like to have agent and referer logfiles, uncomment the
472# following directives.
4af76ed4 473#
9d781f9b
MM
474#CustomLog /var/log/httpd/referer_log referer
475#CustomLog /var/log/httpd/agent_log agent
476
477#
478# If you prefer a single logfile with access, agent, and referer information
479# (Combined Logfile Format) you can use the following directive.
480#
481#CustomLog /var/log/httpd/access_log combined
4af76ed4 482
483#
484# Optionally add a line containing the server version and virtual host
485# name to server-generated pages (error documents, FTP directory listings,
486# mod_status and mod_info output etc., but not CGI generated documents).
487# Set to "EMail" to also include a mailto: link to the ServerAdmin.
488# Set to one of: On | Off | EMail
489#
9d781f9b 490ServerSignature On
4af76ed4 491
492#
493# Aliases: Add here as many aliases as you need (with no limit). The format is
494# Alias fakename realname
495#
496# Note that if you include a trailing / on fakename then the server will
497# require it to be present in the URL. So "/icons" isn't aliased in this
9d781f9b
MM
498# example, only "/icons/". If the fakename is slash-terminated, then the
499# realname must also be slash terminated, and if the fakename omits the
500# trailing slash, the realname must also omit it.
501#
502# We include the /icons/ alias for FancyIndexed directory listings. If you
503# do not use FancyIndexing, you may comment this out.
4af76ed4 504#
9d781f9b 505Alias /icons/ "/home/services/httpd/icons/"
4af76ed4 506
9d781f9b
MM
507<Directory "/home/services/httpd/icons/">
508 Options Indexes MultiViews
509 AllowOverride None
510 Order allow,deny
511 Allow from all
1d3d2b1b 512</Directory>
4af76ed4 513
9d781f9b
MM
514#
515# This should be changed to the ServerRoot/manual/. The alias provides
516# the manual, even if you choose to move your DocumentRoot. You may comment
517# this out if you do not care for the documentation.
518#
519Alias /manual "/home/services/httpd/manual/"
77d023d2 520
9d781f9b
MM
521<Directory "/home/services/httpd/manual/">
522 Options Indexes FollowSymLinks MultiViews
523 AllowOverride None
524 Order allow,deny
525 Allow from all
77d023d2 526</Directory>
527
4af76ed4 528#
529# ScriptAlias: This controls which directories contain server scripts.
530# ScriptAliases are essentially the same as Aliases, except that
531# documents in the realname directory are treated as applications and
532# run by the server when requested rather than as documents sent to the client.
533# The same rules about trailing "/" apply to ScriptAlias directives as to
534# Alias.
535#
9d781f9b
MM
536ScriptAlias /cgi-bin/ "/home/services/httpd/cgi-bin/"
537
538<IfModule mod_cgid.c>
539#
540# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
541# for setting UNIX socket for communicating with cgid.
542#
543#Scriptsock /var/run/apache/cgisock
544</IfModule>
4af76ed4 545
546#
9d781f9b 547# "/home/services/httpd/cgi-bin/" should be changed to whatever your ScriptAliased
4af76ed4 548# CGI directory exists, if you have that configured.
549#
9d781f9b
MM
550<Directory "/home/services/httpd/cgi-bin/">
551 AllowOverride None
552 Options None
553 Order allow,deny
554 Allow from all
4af76ed4 555</Directory>
556
557#
558# Redirect allows you to tell clients about documents which used to exist in
559# your server's namespace, but do not anymore. This allows you to tell the
560# clients where to look for the relocated document.
9d781f9b
MM
561# Example:
562# Redirect permanent /foo http://www.example.com/bar
4af76ed4 563
564#
565# Directives controlling the display of server-generated directory listings.
566#
567
568#
9d781f9b
MM
569# FancyIndexing is whether you want fancy directory indexing or standard.
570# VersionSort is whether files containing version numbers should be
571# compared in the natural way, so that `apache-1.3.9.tar' is placed before
572# `apache-1.3.12.tar'.
4af76ed4 573#
9d781f9b 574IndexOptions FancyIndexing VersionSort
4af76ed4 575
576#
577# AddIcon* directives tell the server which icon to show for different
578# files or filename extensions. These are only displayed for
579# FancyIndexed directories.
580#
581AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
582
583AddIconByType (TXT,/icons/text.gif) text/*
584AddIconByType (IMG,/icons/image2.gif) image/*
585AddIconByType (SND,/icons/sound2.gif) audio/*
586AddIconByType (VID,/icons/movie.gif) video/*
587
588AddIcon /icons/binary.gif .bin .exe
589AddIcon /icons/binhex.gif .hqx
590AddIcon /icons/tar.gif .tar
591AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
592AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
593AddIcon /icons/a.gif .ps .ai .eps
594AddIcon /icons/layout.gif .html .shtml .htm .pdf
595AddIcon /icons/text.gif .txt
596AddIcon /icons/c.gif .c
597AddIcon /icons/p.gif .pl .py
598AddIcon /icons/f.gif .for
599AddIcon /icons/dvi.gif .dvi
600AddIcon /icons/uuencoded.gif .uu
601AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
602AddIcon /icons/tex.gif .tex
603AddIcon /icons/bomb.gif core
604
605AddIcon /icons/back.gif ..
606AddIcon /icons/hand.right.gif README
607AddIcon /icons/folder.gif ^^DIRECTORY^^
608AddIcon /icons/blank.gif ^^BLANKICON^^
609
610#
611# DefaultIcon is which icon to show for files which do not have an icon
612# explicitly set.
613#
614DefaultIcon /icons/unknown.gif
615
616#
617# AddDescription allows you to place a short description after a file in
618# server-generated indexes. These are only displayed for FancyIndexed
619# directories.
620# Format: AddDescription "description" filename
621#
9d781f9b
MM
622#AddDescription "GZIP compressed document" .gz
623#AddDescription "tar archive" .tar
624#AddDescription "GZIP compressed tar archive" .tgz
4af76ed4 625
626#
627# ReadmeName is the name of the README file the server will look for by
628# default, and append to directory listings.
629#
630# HeaderName is the name of a file which should be prepended to
631# directory indexes.
9d781f9b
MM
632ReadmeName README.html
633HeaderName HEADER.html
4af76ed4 634
635#
636# IndexIgnore is a set of filenames which directory indexing should ignore
637# and not include in the listing. Shell-style wildcarding is permitted.
638#
639IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
640
641#
642# AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
643# information on the fly. Note: Not all browsers support this.
644# Despite the name similarity, the following Add* directives have nothing
645# to do with the FancyIndexing customization directives above.
646#
647AddEncoding x-compress Z
9d781f9b 648AddEncoding x-gzip gz tgz
4af76ed4 649
650#
9d781f9b
MM
651# DefaultLanguage and AddLanguage allows you to specify the language of
652# a document. You can then use content negotiation to give a browser a
653# file in a language the user can understand.
654#
655# Specify a default language. This means that all data
656# going out without a specific language tag (see below) will
657# be marked with this one. You probably do NOT want to set
658# this unless you are sure it is correct for all cases.
659#
660# * It is generally better to not mark a page as
661# * being a certain language than marking it with the wrong
662# * language!
663#
664# DefaultLanguage nl
888bfdde
JB
665#
666# Note 1: The suffix does not have to be the same as the language
667# keyword --- those with documents in Polish (whose net-standard
668# language code is pl) may wish to use "AddLanguage pl .po" to
669# avoid the ambiguity with the common suffix for perl scripts.
670#
9d781f9b
MM
671# Note 2: The example entries below illustrate that in some cases
672# the two character 'Language' abbreviation is not identical to
673# the two character 'Country' code for its country,
888bfdde
JB
674# E.g. 'Danmark/dk' versus 'Danish/da'.
675#
676# Note 3: In the case of 'ltz' we violate the RFC by using a three char
9d781f9b 677# specifier. There is 'work in progress' to fix this and get
888bfdde
JB
678# the reference data for rfc1766 cleaned up.
679#
9d781f9b 680# Danish (da) - Dutch (nl) - English (en) - Estonian (et)
888bfdde 681# French (fr) - German (de) - Greek-Modern (el)
9d781f9b 682# Italian (it) - Norwegian (no) - Norwegian Nynorsk (nn) - Korean (kr)
888bfdde
JB
683# Portugese (pt) - Luxembourgeois* (ltz)
684# Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
685# Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
9d781f9b 686# Russian (ru) - Croatian (hr)
888bfdde 687#
888bfdde 688AddLanguage da .dk
9d781f9b 689AddLanguage nl .nl
888bfdde 690AddLanguage en .en
9d781f9b 691AddLanguage et .et
888bfdde 692AddLanguage fr .fr
9d781f9b 693AddLanguage de .de
888bfdde 694AddLanguage he .he
9d781f9b 695AddLanguage el .el
4af76ed4 696AddLanguage it .it
888bfdde 697AddLanguage ja .ja
9d781f9b 698AddLanguage pl .po
888bfdde 699AddLanguage kr .kr
9d781f9b 700AddLanguage pt .pt
48184c11 701AddLanguage nn .nn
888bfdde 702AddLanguage no .no
888bfdde 703AddLanguage pt-br .pt-br
9d781f9b
MM
704AddLanguage ltz .ltz
705AddLanguage ca .ca
706AddLanguage es .es
707AddLanguage sv .se
708AddLanguage cz .cz
888bfdde 709AddLanguage ru .ru
888bfdde 710AddLanguage tw .tw
48184c11 711AddLanguage zh-tw .tw
9d781f9b 712AddLanguage hr .hr
888bfdde 713
4af76ed4 714#
715# LanguagePriority allows you to give precedence to some languages
716# in case of a tie during content negotiation.
4af76ed4 717#
9d781f9b
MM
718# Just list the languages in decreasing order of preference. We have
719# more or less alphabetized them here. You probably want to change this.
720#
721LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ltz ca es sv tw
4af76ed4 722
888bfdde 723#
9d781f9b
MM
724# ForceLanguagePriority allows you to serve a result page rather than
725# MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback)
726# [in case no accepted languages matched the available variants]
888bfdde 727#
9d781f9b
MM
728ForceLanguagePriority Prefer Fallback
729
888bfdde 730#
9d781f9b
MM
731# Specify a default charset for all pages sent out. This is
732# always a good idea and opens the door for future internationalisation
733# of your web site, should you ever want it. Specifying it as
734# a default does little harm; as the standard dictates that a page
735# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
736# are merely stating the obvious. There are also some security
737# reasons in browsers, related to javascript and URL parsing
738# which encourage you to always set a default char set.
888bfdde 739#
9d781f9b
MM
740AddDefaultCharset ISO-8859-2
741
888bfdde 742#
9d781f9b
MM
743# Commonly used filename extensions to character sets. You probably
744# want to avoid clashes with the language extensions, unless you
745# are good at carefully testing your setup after each change.
746# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets for
747# the official list of charset names and their respective RFCs
888bfdde 748#
9d781f9b
MM
749AddCharset ISO-8859-1 .iso8859-1 .latin1
750AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen
751AddCharset ISO-8859-3 .iso8859-3 .latin3
752AddCharset ISO-8859-4 .iso8859-4 .latin4
753AddCharset ISO-8859-5 .iso8859-5 .latin5 .cyr .iso-ru
754AddCharset ISO-8859-6 .iso8859-6 .latin6 .arb
755AddCharset ISO-8859-7 .iso8859-7 .latin7 .grk
756AddCharset ISO-8859-8 .iso8859-8 .latin8 .heb
757AddCharset ISO-8859-9 .iso8859-9 .latin9 .trk
758AddCharset ISO-2022-JP .iso2022-jp .jis
759AddCharset ISO-2022-KR .iso2022-kr .kis
760AddCharset ISO-2022-CN .iso2022-cn .cis
761AddCharset Big5 .Big5 .big5
762# For russian, more than one charset is used (depends on client, mostly):
763AddCharset WINDOWS-1251 .cp-1251 .win-1251
764AddCharset CP866 .cp866
765AddCharset KOI8-r .koi8-r .koi8-ru
766AddCharset KOI8-ru .koi8-uk .ua
767AddCharset ISO-10646-UCS-2 .ucs2
768AddCharset ISO-10646-UCS-4 .ucs4
769AddCharset UTF-8 .utf8
888bfdde 770
9d781f9b
MM
771# The set below does not map to a specific (iso) standard
772# but works on a fairly wide range of browsers. Note that
773# capitalization actually matters (it should not, but it
774# does for some browsers).
4af76ed4 775#
9d781f9b
MM
776# See ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
777# for a list of sorts. But browsers support few.
4af76ed4 778#
9d781f9b
MM
779AddCharset GB2312 .gb2312 .gb
780AddCharset utf-7 .utf7
781AddCharset utf-8 .utf8
782AddCharset big5 .big5 .b5
783AddCharset EUC-TW .euc-tw
784AddCharset EUC-JP .euc-jp
785AddCharset EUC-KR .euc-kr
786AddCharset shift_jis .sjis
787
4af76ed4 788#
9d781f9b
MM
789# AddType allows you to add to or override the MIME configuration
790# file mime.types for specific file types.
4af76ed4 791#
9d781f9b 792AddType application/x-tar .tgz
4af76ed4 793
794#
9d781f9b
MM
795# AddHandler allows you to map certain file extensions to "handlers":
796# actions unrelated to filetype. These can be either built into the server
797# or added with the Action directive (see below)
4af76ed4 798#
9d781f9b
MM
799# To use CGI scripts outside of ScriptAliased directories:
800# (You will also need to add "ExecCGI" to the "Options" directive.)
801#
802#AddHandler cgi-script .cgi
4af76ed4 803
804#
9d781f9b 805# For files that include their own HTTP headers:
4af76ed4 806#
9d781f9b 807#AddHandler send-as-is asis
4af76ed4 808
809#
9d781f9b 810# For server-parsed imagemap files:
4af76ed4 811#
9d781f9b 812#AddHandler imap-file map
4af76ed4 813
814#
9d781f9b
MM
815# For type maps (negotiated resources):
816# (This is enabled by default to allow the Apache "It Worked" page
817# to be distributed in multiple languages.)
4af76ed4 818#
819AddHandler type-map var
820
9d781f9b
MM
821# Filters allow you to process content before it is sent to the client.
822#
823# To parse .shtml files for server-side includes (SSI):
824# (You will also need to add "Includes" to the "Options" directive.)
825#
826#AddOutputFilter INCLUDES .shtml
827
4af76ed4 828#
829# Action lets you define media types that will execute a script whenever
830# a matching file is called. This eliminates the need for repeated URL
831# pathnames for oft-used CGI file processors.
832# Format: Action media/type /cgi-script/location
833# Format: Action handler-name /cgi-script/location
834#
835
836#
9d781f9b
MM
837# Customizable error responses come in three flavors:
838# 1) plain text 2) local redirects 3) external redirects
4af76ed4 839#
9d781f9b
MM
840# Some examples:
841#ErrorDocument 500 "The server made a boo boo."
4af76ed4 842#ErrorDocument 404 /missing.html
9d781f9b
MM
843#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
844#ErrorDocument 402 http://www.example.com/subscription_info.html
845#
846
847#
848# Putting this all together, we can Internationalize error responses.
849#
850# We use Alias to redirect any /error/HTTP_<error>.html.var response to
851# our collection of by-error message multi-language collections. We use
852# includes to substitute the appropriate text.
853#
854# You can modify the messages' appearance without changing any of the
855# default HTTP_<error>.html.var files by adding the line;
856#
857# Alias /error/include/ "/your/include/path/"
858#
859# which allows you to create your own set of files by starting with the
860# /etc/httpd/httpd//include/ files and
861# copying them to /your/include/path/, even on a per-VirtualHost basis.
862#
863
864<IfModule mod_negotiation.c>
865<IfModule mod_include.c>
866 Alias /error/ "/home/services/httpd/error/"
867
868 <Directory "/home/services/httpd/error/">
869 AllowOverride None
870 Options IncludesNoExec
871 AddOutputFilter Includes html
872 AddHandler type-map var
873 Order allow,deny
874 Allow from all
875 LanguagePriority en es de fr
876 ForceLanguagePriority Prefer Fallback
877 </Directory>
878
879 ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
880 ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
881 ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
882 ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
883 ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
884 ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
885 ErrorDocument 410 /error/HTTP_GONE.html.var
886 ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
887 ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
888 ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
889 ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
890 ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
891 ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
892 ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
893 ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
894 ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
895 ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
7745b7bc 896
9d781f9b
MM
897</IfModule>
898</IfModule>
52e4c839 899
9d781f9b
MM
900#
901# The following directives modify normal HTTP response behavior to
902# handle known problems with browser implementations.
4af76ed4 903#
904BrowserMatch "Mozilla/2" nokeepalive
905BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
4af76ed4 906BrowserMatch "RealPlayer 4\.0" force-response-1.0
907BrowserMatch "Java/1\.0" force-response-1.0
908BrowserMatch "JDK/1\.0" force-response-1.0
909
4af76ed4 910#
9d781f9b
MM
911# The following directive disables redirects on non-GET requests for
912# a directory that does not include the trailing slash. This fixes a
913# problem with Microsoft WebFolders which does not appropriately handle
914# redirects for folders with DAV methods.
4af76ed4 915#
9d781f9b
MM
916BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
917BrowserMatch "^WebDrive" redirect-carefully
918
4af76ed4 919
This page took 0.545507 seconds and 4 git commands to generate.