1#
2# This is the main Apache HTTP server configuration file.  It contains the
3# configuration directives that give the server its instructions.
4# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
5# In particular, see 
6# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
7# for a discussion of each configuration directive.
8#
9# 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# Configuration and logfile names: If the filenames you specify for many
14# of the server's control files begin with "/" (or "drive:/" for Win32), the
15# server will use that explicit path.  If the filenames do *not* begin
16# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
17# with ServerRoot set to '/www' will be interpreted by the
18# server as '/www/log/access_log', where as '/log/access_log' will be
19# interpreted as '/log/access_log'.
20
21#
22# ServerRoot: The top of the directory tree under which the server's
23# configuration, error, and log files are kept.
24#
25# Do not add a slash at the end of the directory path.  If you point
26# ServerRoot at a non-local disk, be sure to point the LockFile directive
27# at a local disk.  If you wish to share the same ServerRoot for multiple
28# httpd daemons, you will need to change at least LockFile and PidFile.
29#
30ServerRoot "@@ServerRoot@@"
31
32#
33# Listen: Allows you to bind Apache to specific IP addresses and/or
34# ports, instead of the default. See also the <VirtualHost>
35# directive.
36#
37# Change this to Listen on specific IP addresses as shown below to 
38# prevent Apache from glomming onto all bound IP addresses.
39#
40#Listen 12.34.56.78:80
41Listen @@Port@@
42
43#
44# Dynamic Shared Object (DSO) Support
45#
46# To be able to use the functionality of a module which was built as a DSO you
47# have to place corresponding `LoadModule' lines at this location so the
48# directives contained in it are actually available _before_ they are used.
49# Statically compiled modules (those listed by `httpd -l') do not need
50# to be loaded here.
51#
52# Example:
53# LoadModule foo_module modules/mod_foo.so
54#
55@@LoadModule@@
56#LoadModule perl_module libexec/apache2/mod_perl.so
57#LoadModule php5_module libexec/apache2/libphp5.so
58LoadModule hfs_apple_module libexec/apache2/mod_hfs_apple.so
59
60<IfModule !mpm_netware_module>
61<IfModule !mpm_winnt_module>
62#
63# If you wish httpd to run as a different user or group, you must run
64# httpd as root initially and it will switch.  
65#
66# User/Group: The name (or #number) of the user/group to run httpd as.
67# It is usually good practice to create a dedicated user and group for
68# running httpd, as with most system services.
69#
70User _www
71Group _www
72
73</IfModule>
74</IfModule>
75
76# 'Main' server configuration
77#
78# The directives in this section set up the values used by the 'main'
79# server, which responds to any requests that aren't handled by a
80# <VirtualHost> definition.  These values also provide defaults for
81# any <VirtualHost> containers you may define later in the file.
82#
83# All of these directives may appear inside <VirtualHost> containers,
84# in which case these default settings will be overridden for the
85# virtual host being defined.
86#
87
88#
89# ServerAdmin: Your address, where problems with the server should be
90# e-mailed.  This address appears on some server-generated pages, such
91# as error documents.  e.g. admin@your-domain.com
92#
93ServerAdmin you@example.com
94
95#
96# ServerName gives the name and port that the server uses to identify itself.
97# This can often be determined automatically, but we recommend you specify
98# it explicitly to prevent problems during startup.
99#
100# If your host doesn't have a registered DNS name, enter its IP address here.
101#
102#ServerName www.example.com:@@Port@@
103
104#
105# DocumentRoot: The directory out of which you will serve your
106# documents. By default, all requests are taken from this directory, but
107# symbolic links and aliases may be used to point to other locations.
108#
109DocumentRoot "@exp_htdocsdir@"
110
111#
112# Each directory to which Apache has access can be configured with respect
113# to which services and features are allowed and/or disabled in that
114# directory (and its subdirectories). 
115#
116# First, we configure the "default" to be a very restrictive set of 
117# features.  
118#
119<Directory />
120    Options FollowSymLinks
121    AllowOverride None
122    Order deny,allow
123    Deny from all
124</Directory>
125
126#
127# Note that from this point forward you must specifically allow
128# particular features to be enabled - so if something's not working as
129# you might expect, make sure that you have specifically enabled it
130# below.
131#
132
133#
134# This should be changed to whatever you set DocumentRoot to.
135#
136<Directory "@exp_htdocsdir@">
137    #
138    # Possible values for the Options directive are "None", "All",
139    # or any combination of:
140    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
141    #
142    # Note that "MultiViews" must be named *explicitly* --- "Options All"
143    # doesn't give it to you.
144    #
145    # The Options directive is both complicated and important.  Please see
146    # http://httpd.apache.org/docs/2.2/mod/core.html#options
147    # for more information.
148    #
149    Options Indexes FollowSymLinks MultiViews
150
151    #
152    # AllowOverride controls what directives may be placed in .htaccess files.
153    # It can be "All", "None", or any combination of the keywords:
154    #   Options FileInfo AuthConfig Limit
155    #
156    AllowOverride None
157
158    #
159    # Controls who can get stuff from this server.
160    #
161    Order allow,deny
162    Allow from all
163
164</Directory>
165
166#
167# DirectoryIndex: sets the file that Apache will serve if a directory
168# is requested.
169#
170<IfModule dir_module>
171    DirectoryIndex index.html
172</IfModule>
173
174#
175# The following lines prevent .htaccess and .htpasswd files from being 
176# viewed by Web clients. 
177#
178<FilesMatch "^\.([Hh][Tt]|[Dd][Ss]_[Ss])">
179    Order allow,deny
180    Deny from all
181    Satisfy All
182</FilesMatch>
183
184#
185# Apple specific filesystem protection.
186#
187<Files "rsrc">
188    Order allow,deny
189    Deny from all
190    Satisfy All
191</Files>
192<DirectoryMatch ".*\.\.namedfork">
193    Order allow,deny
194    Deny from all
195    Satisfy All
196</DirectoryMatch>
197
198#
199# ErrorLog: The location of the error log file.
200# If you do not specify an ErrorLog directive within a <VirtualHost>
201# container, error messages relating to that virtual host will be
202# logged here.  If you *do* define an error logfile for a <VirtualHost>
203# container, that host's errors will be logged there and not here.
204#
205ErrorLog "@rel_logfiledir@/error_log"
206
207#
208# LogLevel: Control the number of messages logged to the error_log.
209# Possible values include: debug, info, notice, warn, error, crit,
210# alert, emerg.
211#
212LogLevel warn
213
214<IfModule log_config_module>
215    #
216    # The following directives define some format nicknames for use with
217    # a CustomLog directive (see below).
218    #
219    LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
220    LogFormat "%h %l %u %t \"%r\" %>s %b" common
221
222    <IfModule logio_module>
223      # You need to enable mod_logio.c to use %I and %O
224      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
225    </IfModule>
226
227    #
228    # The location and format of the access logfile (Common Logfile Format).
229    # If you do not define any access logfiles within a <VirtualHost>
230    # container, they will be logged here.  Contrariwise, if you *do*
231    # define per-<VirtualHost> access logfiles, transactions will be
232    # logged therein and *not* in this file.
233    #
234    CustomLog "@rel_logfiledir@/access_log" common
235
236    #
237    # If you prefer a logfile with access, agent, and referer information
238    # (Combined Logfile Format) you can use the following directive.
239    #
240    #CustomLog "@rel_logfiledir@/access_log" combined
241</IfModule>
242
243<IfModule alias_module>
244    #
245    # Redirect: Allows you to tell clients about documents that used to 
246    # exist in your server's namespace, but do not anymore. The client 
247    # will make a new request for the document at its new location.
248    # Example:
249    # Redirect permanent /foo http://www.example.com/bar
250
251    #
252    # Alias: Maps web paths into filesystem paths and is used to
253    # access content that does not live under the DocumentRoot.
254    # Example:
255    # Alias /webpath /full/filesystem/path
256    #
257    # If you include a trailing / on /webpath then the server will
258    # require it to be present in the URL.  You will also likely
259    # need to provide a <Directory> section to allow access to
260    # the filesystem path.
261
262    #
263    # ScriptAlias: This controls which directories contain server scripts. 
264    # ScriptAliases are essentially the same as Aliases, except that
265    # documents in the target directory are treated as applications and
266    # run by the server when requested rather than as documents sent to the
267    # client.  The same rules about trailing "/" apply to ScriptAlias
268    # directives as to Alias.
269    #
270    ScriptAliasMatch ^/cgi-bin/((?!(?i:webobjects)).*$) "@exp_cgidir@/$1"
271
272</IfModule>
273
274<IfModule cgid_module>
275    #
276    # ScriptSock: On threaded servers, designate the path to the UNIX
277    # socket used to communicate with the CGI daemon of mod_cgid.
278    #
279    #Scriptsock @rel_runtimedir@/cgisock
280</IfModule>
281
282#
283# "@exp_cgidir@" should be changed to whatever your ScriptAliased
284# CGI directory exists, if you have that configured.
285#
286<Directory "@exp_cgidir@">
287    AllowOverride None
288    Options None
289    Order allow,deny
290    Allow from all
291</Directory>
292
293#
294# DefaultType: the default MIME type the server will use for a document
295# if it cannot otherwise determine one, such as from filename extensions.
296# If your server contains mostly text or HTML documents, "text/plain" is
297# a good value.  If most of your content is binary, such as applications
298# or images, you may want to use "application/octet-stream" instead to
299# keep browsers from trying to display binary files as though they are
300# text.
301#
302DefaultType text/plain
303
304<IfModule mime_module>
305    #
306    # TypesConfig points to the file containing the list of mappings from
307    # filename extension to MIME-type.
308    #
309    TypesConfig @rel_sysconfdir@/mime.types
310
311    #
312    # AddType allows you to add to or override the MIME configuration
313    # file specified in TypesConfig for specific file types.
314    #
315    #AddType application/x-gzip .tgz
316    #
317    # AddEncoding allows you to have certain browsers uncompress
318    # information on the fly. Note: Not all browsers support this.
319    #
320    #AddEncoding x-compress .Z
321    #AddEncoding x-gzip .gz .tgz
322    #
323    # If the AddEncoding directives above are commented-out, then you
324    # probably should define those extensions to indicate media types:
325    #
326    AddType application/x-compress .Z
327    AddType application/x-gzip .gz .tgz
328
329    #
330    # AddHandler allows you to map certain file extensions to "handlers":
331    # actions unrelated to filetype. These can be either built into the server
332    # or added with the Action directive (see below)
333    #
334    # To use CGI scripts outside of ScriptAliased directories:
335    # (You will also need to add "ExecCGI" to the "Options" directive.)
336    #
337    #AddHandler cgi-script .cgi
338
339    # For type maps (negotiated resources):
340    #AddHandler type-map var
341
342    #
343    # Filters allow you to process content before it is sent to the client.
344    #
345    # To parse .shtml files for server-side includes (SSI):
346    # (You will also need to add "Includes" to the "Options" directive.)
347    #
348    #AddType text/html .shtml
349    #AddOutputFilter INCLUDES .shtml
350</IfModule>
351
352#
353# The mod_mime_magic module allows the server to use various hints from the
354# contents of the file itself to determine its type.  The MIMEMagicFile
355# directive tells the module where the hint definitions are located.
356#
357#MIMEMagicFile @rel_sysconfdir@/magic
358
359#
360# Customizable error responses come in three flavors:
361# 1) plain text 2) local redirects 3) external redirects
362#
363# Some examples:
364#ErrorDocument 500 "The server made a boo boo."
365#ErrorDocument 404 /missing.html
366#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
367#ErrorDocument 402 http://www.example.com/subscription_info.html
368#
369
370#
371# MaxRanges: Maximum number of Ranges in a request before
372# returning the entire resource, or one of the special
373# values 'default', 'none' or 'unlimited'.
374# Default setting is to accept 200 Ranges.
375#MaxRanges unlimited
376
377#
378# EnableMMAP and EnableSendfile: On systems that support it, 
379# memory-mapping or the sendfile syscall is used to deliver
380# files.  This usually improves server performance, but must
381# be turned off when serving from networked-mounted 
382# filesystems or if support for these functions is otherwise
383# broken on your system.
384#
385#EnableMMAP off
386#EnableSendfile off
387
388# 6894961
389TraceEnable off
390
391# Supplemental configuration
392#
393# The configuration files in the @rel_sysconfdir@/extra/ directory can be 
394# included to add extra features or to modify the default configuration of 
395# the server, or you may simply copy their contents here and change as 
396# necessary.
397
398# Server-pool management (MPM specific)
399Include @rel_sysconfdir@/extra/httpd-mpm.conf
400
401# Multi-language error messages
402#Include @rel_sysconfdir@/extra/httpd-multilang-errordoc.conf
403
404# Fancy directory listings
405Include @rel_sysconfdir@/extra/httpd-autoindex.conf
406
407# Language settings
408Include @rel_sysconfdir@/extra/httpd-languages.conf
409
410# User home directories
411Include @rel_sysconfdir@/extra/httpd-userdir.conf
412
413# Real-time info on requests and configuration
414#Include @rel_sysconfdir@/extra/httpd-info.conf
415
416# Virtual hosts
417#Include @rel_sysconfdir@/extra/httpd-vhosts.conf
418
419# Local access to the Apache HTTP Server Manual
420Include @rel_sysconfdir@/extra/httpd-manual.conf
421
422# Distributed authoring and versioning (WebDAV)
423#Include @rel_sysconfdir@/extra/httpd-dav.conf
424
425# Various default settings
426#Include @rel_sysconfdir@/extra/httpd-default.conf
427
428# Secure (SSL/TLS) connections
429#Include @rel_sysconfdir@/extra/httpd-ssl.conf
430#
431# Note: The following must must be present to support
432#       starting without SSL on platforms with no /dev/random equivalent
433#       but a statically compiled-in mod_ssl.
434#
435<IfModule ssl_module>
436SSLRandomSeed startup builtin
437SSLRandomSeed connect builtin
438</IfModule>
439
440Include @rel_sysconfdir@/other/*.conf
441