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