1##
2## httpd.conf -- Apache HTTP server configuration file
3##
4
5#
6# Based upon the NCSA server configuration files originally by Rob McCool.
7#
8# This is the main Apache server configuration file.  It contains the
9# configuration directives that give the server its instructions.
10# See <URL:http://www.apache.org/docs/> for detailed information about
11# the directives.
12#
13# Solaris Quick Configuration Information
14#
15# 1. Set ServerName if necessary (default is 127.0.0.1)
16# 2. Set ServerAdmin to a valid email address
17# 3. If configuring Jserv or Tomcat, read comments at
18#    the bottom of this file.
19#
20#
21# Do NOT simply read the instructions in here without understanding
22# what they do.  They're here only as hints or reminders.  If you are unsure
23# consult the online docs. You have been warned.
24#
25# After this file is processed, the server will look for and process
26# /etc/apache/srm.conf and then /etc/apache/access.conf
27# unless you have overridden these with ResourceConfig and/or
28# AccessConfig directives here.
29#
30# The configuration directives are grouped into three basic sections:
31#  1. Directives that control the operation of the Apache server process as a
32#     whole (the 'global environment').
33#  2. Directives that define the parameters of the 'main' or 'default' server,
34#     which responds to requests that aren't handled by a virtual host.
35#     These directives also provide default values for the settings
36#     of all virtual hosts.
37#  3. Settings for virtual hosts, which allow Web requests to be sent to
38#     different IP addresses or hostnames and have them handled by the
39#     same Apache server process.
40#
41# Configuration and logfile names: If the filenames you specify for many
42# of the server's control files begin with "/" (or "drive:/" for Win32), the
43# server will use that explicit path.  If the filenames do *not* begin
44# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
45# with ServerRoot set to "/usr/local/apache" will be interpreted by the
46# server as "/usr/local/apache/logs/foo.log".
47#
48
49### Section 1: Global Environment
50#
51# The directives in this section affect the overall operation of Apache,
52# such as the number of concurrent requests it can handle or where it
53# can find its configuration files.
54#
55
56#
57# ServerType is either inetd, or standalone.  Inetd mode is only supported on
58# Unix platforms.
59#
60ServerType standalone
61
62#
63# ServerRoot: The top of the directory tree under which the server's
64# configuration, error, and log files are kept.
65#
66# NOTE!  If you intend to place this on an NFS (or otherwise network)
67# mounted filesystem then please read the LockFile documentation
68# (available at <URL:http://www.apache.org/docs/mod/core.html#lockfile>);
69# you will save yourself a lot of trouble.
70#
71ServerRoot "/usr/apache"
72
73#
74# The LockFile directive sets the path to the lockfile used when Apache
75# is compiled with either USE_FCNTL_SERIALIZED_ACCEPT or
76# USE_FLOCK_SERIALIZED_ACCEPT. This directive should normally be left at
77# its default value. The main reason for changing it is if the logs
78# directory is NFS mounted, since the lockfile MUST BE STORED ON A LOCAL
79# DISK. The PID of the main server process is automatically appended to
80# the filename.
81#
82#LockFile /var/run/httpd.lock
83
84#
85# PidFile: The file in which the server should record its process
86# identification number when it starts.
87#
88PidFile /var/run/httpd.pid
89
90#
91# ScoreBoardFile: File used to store internal server process information.
92# Not all architectures require this.  But if yours does (you'll know because
93# this file will be  created when you run Apache) then you *must* ensure that
94# no two invocations of Apache share the same scoreboard file.
95#
96ScoreBoardFile /var/run/httpd.scoreboard
97
98#
99# In the standard configuration, the server will process httpd.conf (this
100# file, specified by the -f command line option), srm.conf, and access.conf
101# in that order.  The latter two files are now distributed empty, as it is
102# recommended that all directives be kept in a single file for simplicity.
103# The commented-out values below are the built-in defaults.  You can have the
104# server ignore these files altogether by using "/dev/null" (for Unix) or
105# "nul" (for Win32) for the arguments to the directives.
106#
107#ResourceConfig conf/srm.conf
108#AccessConfig conf/access.conf
109
110#
111# Timeout: The number of seconds before receives and sends time out.
112#
113Timeout 300
114
115#
116# KeepAlive: Whether or not to allow persistent connections (more than
117# one request per connection). Set to "Off" to deactivate.
118#
119KeepAlive On
120
121#
122# MaxKeepAliveRequests: The maximum number of requests to allow
123# during a persistent connection. Set to 0 to allow an unlimited amount.
124# We recommend you leave this number high, for maximum performance.
125#
126MaxKeepAliveRequests 100
127
128#
129# KeepAliveTimeout: Number of seconds to wait for the next request from the
130# same client on the same connection.
131#
132KeepAliveTimeout 15
133
134#
135# Server-pool size regulation.  Rather than making you guess how many
136# server processes you need, Apache dynamically adapts to the load it
137# sees --- that is, it tries to maintain enough server processes to
138# handle the current load, plus a few spare servers to handle transient
139# load spikes (e.g., multiple simultaneous requests from a single
140# Netscape browser).
141#
142# It does this by periodically checking how many servers are waiting
143# for a request.  If there are fewer than MinSpareServers, it creates
144# a new spare.  If there are more than MaxSpareServers, some of the
145# spares die off.  The default values are probably OK for most sites.
146#
147MinSpareServers 5
148MaxSpareServers 10
149
150#
151# Number of servers to start initially --- should be a reasonable ballpark
152# figure.
153#
154StartServers 5
155
156#
157# Limit on total number of servers running, i.e., limit on the number
158# of clients who can simultaneously connect --- if this limit is ever
159# reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW.
160# It is intended mainly as a brake to keep a runaway server from taking
161# the system with it as it spirals down...
162#
163MaxClients 150
164
165#
166# MaxRequestsPerChild: the number of requests each child process is
167# allowed to process before the child dies.  The child will exit so
168# as to avoid problems after prolonged use when Apache (and maybe the
169# libraries it uses) leak memory or other resources.  On most systems, this
170# isn't really needed, but a few (such as Solaris) do have notable leaks
171# in the libraries. For these platforms, set to something like 10000
172# or so; a setting of 0 means unlimited.
173#
174# NOTE: This value does not include keepalive requests after the initial
175#       request per connection. For example, if a child process handles
176#       an initial request and 10 subsequent "keptalive" requests, it
177#       would only count as 1 request towards this limit.
178#
179MaxRequestsPerChild 0
180
181#
182# Listen: Allows you to bind Apache to specific IP addresses and/or
183# ports, in addition to the default. See also the <VirtualHost>
184# directive.
185#
186#Listen 3000
187#Listen 12.34.56.78:80
188
189#
190# BindAddress: You can support virtual hosts with this option. This directive
191# is used to tell the server which IP address to listen to. It can either
192# contain "*", an IP address, or a fully qualified Internet domain name.
193# See also the <VirtualHost> and Listen directives.
194#
195#BindAddress *
196
197#
198# Dynamic Shared Object (DSO) Support
199#
200# To be able to use the functionality of a module which was built as a DSO you
201# have to place corresponding `LoadModule' lines at this location so the
202# directives contained in it are actually available _before_ they are used.
203# Please read the file http://httpd.apache.org/docs/dso.html for more
204# details about the DSO mechanism and run `httpd -l' for the list of already
205# built-in (statically linked and thus always available) modules in your httpd
206# binary.
207#
208# Note: The order in which modules are loaded is important.  Don't change
209# the order below without expert advice.
210#
211# Example:
212# LoadModule foo_module libexec/mod_foo.so
213LoadModule mmap_static_module libexec/mod_mmap_static.so
214LoadModule vhost_alias_module libexec/mod_vhost_alias.so
215LoadModule env_module         libexec/mod_env.so
216LoadModule config_log_module  libexec/mod_log_config.so
217LoadModule agent_log_module   libexec/mod_log_agent.so
218LoadModule referer_log_module libexec/mod_log_referer.so
219LoadModule mime_magic_module  libexec/mod_mime_magic.so
220LoadModule mime_module        libexec/mod_mime.so
221LoadModule negotiation_module libexec/mod_negotiation.so
222LoadModule status_module      libexec/mod_status.so
223LoadModule info_module        libexec/mod_info.so
224LoadModule includes_module    libexec/mod_include.so
225LoadModule autoindex_module   libexec/mod_autoindex.so
226LoadModule dir_module         libexec/mod_dir.so
227LoadModule cgi_module         libexec/mod_cgi.so
228LoadModule asis_module        libexec/mod_asis.so
229LoadModule imap_module        libexec/mod_imap.so
230LoadModule action_module      libexec/mod_actions.so
231LoadModule speling_module     libexec/mod_speling.so
232LoadModule userdir_module     libexec/mod_userdir.so
233LoadModule alias_module       libexec/mod_alias.so
234LoadModule rewrite_module     libexec/mod_rewrite.so
235LoadModule access_module      libexec/mod_access.so
236LoadModule auth_module        libexec/mod_auth.so
237LoadModule anon_auth_module   libexec/mod_auth_anon.so
238LoadModule dbm_auth_module    libexec/mod_auth_dbm.so
239LoadModule digest_module      libexec/mod_digest.so
240LoadModule proxy_module       libexec/libproxy.so
241LoadModule cern_meta_module   libexec/mod_cern_meta.so
242LoadModule expires_module     libexec/mod_expires.so
243LoadModule headers_module     libexec/mod_headers.so
244LoadModule usertrack_module   libexec/mod_usertrack.so
245LoadModule example_module     libexec/mod_example.so
246LoadModule unique_id_module   libexec/mod_unique_id.so
247LoadModule setenvif_module    libexec/mod_setenvif.so
248LoadModule perl_module        libexec/libperl.so
249
250#  Reconstruction of the complete module list from all available modules
251#  (static and shared ones) to achieve correct module execution order.
252#  [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO]
253ClearModuleList
254AddModule mod_mmap_static.c
255AddModule mod_vhost_alias.c
256AddModule mod_env.c
257AddModule mod_log_config.c
258AddModule mod_log_agent.c
259AddModule mod_log_referer.c
260AddModule mod_mime_magic.c
261AddModule mod_mime.c
262AddModule mod_negotiation.c
263AddModule mod_status.c
264AddModule mod_info.c
265AddModule mod_include.c
266AddModule mod_autoindex.c
267AddModule mod_dir.c
268AddModule mod_cgi.c
269AddModule mod_asis.c
270AddModule mod_imap.c
271AddModule mod_actions.c
272AddModule mod_speling.c
273AddModule mod_userdir.c
274AddModule mod_alias.c
275AddModule mod_rewrite.c
276AddModule mod_access.c
277AddModule mod_auth.c
278AddModule mod_auth_anon.c
279AddModule mod_auth_dbm.c
280AddModule mod_digest.c
281AddModule mod_proxy.c
282AddModule mod_cern_meta.c
283AddModule mod_expires.c
284AddModule mod_headers.c
285AddModule mod_usertrack.c
286AddModule mod_example.c
287AddModule mod_unique_id.c
288AddModule mod_so.c
289AddModule mod_setenvif.c
290AddModule mod_perl.c
291
292#
293# ExtendedStatus controls whether Apache will generate "full" status
294# information (ExtendedStatus On) or just basic information (ExtendedStatus
295# Off) when the "server-status" handler is called. The default is Off.
296#
297#ExtendedStatus On
298
299### Section 2: 'Main' server configuration
300#
301# The directives in this section set up the values used by the 'main'
302# server, which responds to any requests that aren't handled by a
303# <VirtualHost> definition.  These values also provide defaults for
304# any <VirtualHost> containers you may define later in the file.
305#
306# All of these directives may appear inside <VirtualHost> containers,
307# in which case these default settings will be overridden for the
308# virtual host being defined.
309#
310
311#
312# If your ServerType directive (set earlier in the 'Global Environment'
313# section) is set to "inetd", the next few directives don't have any
314# effect since their settings are defined by the inetd configuration.
315# Skip ahead to the ServerAdmin directive.
316#
317
318#
319# Port: The port to which the standalone server listens. For
320# ports < 1023, you will need httpd to be run as root initially.
321#
322Port 80
323
324#
325# If you wish httpd to run as a different user or group, you must run
326# httpd as root initially and it will switch.
327#
328# User/Group: The name (or #number) of the user/group to run httpd as.
329#  . On SCO (ODT 3) use "User nouser" and "Group nogroup".
330#  . On HPUX you may not be able to use shared memory as nobody, and the
331#    suggested workaround is to create a user www and use that user.
332#  NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET)
333#  when the value of (unsigned)Group is above 60000;
334#  don't use Group nobody on these systems!
335#
336User nobody
337Group nogroup
338
339#
340# ServerAdmin: Your address, where problems with the server should be
341# e-mailed.  This address appears on some server-generated pages, such
342# as error documents.
343#
344ServerAdmin nobody@nowhere.com
345
346#
347# ServerName allows you to set a host name which is sent back to clients for
348# your server if it's different than the one the program would get (i.e., use
349# "www" instead of the host's real name).
350#
351# Note: You cannot just invent host names and hope they work. The name you
352# define here must be a valid DNS name for your host. If you don't understand
353# this, ask your network administrator.
354# If your host doesn't have a registered DNS name, enter its IP address here.
355# You will have to access it by its address (e.g., http://123.45.67.89/)
356# anyway, and this will make redirections work in a sensible way.
357#
358# 127.0.0.1 is the TCP/IP local loop-back address, often named localhost. Your
359# machine always knows itself by this address. If you use Apache strictly for
360# local testing and development, you may use 127.0.0.1 as the server name.
361#
362ServerName your-momma.nowhere.com
363
364#
365# DocumentRoot: The directory out of which you will serve your
366# documents. By default, all requests are taken from this directory, but
367# symbolic links and aliases may be used to point to other locations.
368#
369DocumentRoot "/no/where"
370
371#
372# Each directory to which Apache has access, can be configured with respect
373# to which services and features are allowed and/or disabled in that
374# directory (and its subdirectories).
375#
376# First, we configure the "default" to be a very restrictive set of
377# permissions.
378#
379<Directory />
380    Options FollowSymLinks
381    AllowOverride None
382</Directory>
383
384#
385# Note that from this point forward you must specifically allow
386# particular features to be enabled - so if something's not working as
387# you might expect, make sure that you have specifically enabled it
388# below.
389#
390
391#
392# This should be changed to whatever you set DocumentRoot to.
393#
394<Directory "/no/where">
395
396#
397# This may also be "None", "All", or any combination of "Indexes",
398# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
399#
400# Note that "MultiViews" must be named *explicitly* --- "Options All"
401# doesn't give it to you.
402#
403    Options Indexes FollowSymLinks MultiViews Includes ExecCGI
404
405#
406# This controls which options the .htaccess files in directories can
407# override. Can also be "All", or any combination of "Options", "FileInfo",
408# "AuthConfig", and "Limit"
409#
410    AllowOverride All
411
412#
413# Controls who can get stuff from this server.
414#
415    Order allow,deny
416    Allow from all
417</Directory>
418
419<Directory /no/where/htdocs>
420  Options Indexes FollowSymlinks Multiviews Includes ExecCGI
421  AllowOverride All
422  Order allow,deny
423  Allow from all
424</Directory>
425
426#
427# UserDir: The name of the directory which is appended onto a user's home
428# directory if a ~user request is received.
429#
430<IfModule mod_userdir.c>
431    UserDir public_html
432</IfModule>
433
434#
435# Control access to UserDir directories.  The following is an example
436# for a site where these directories are restricted to read-only.
437#
438<Directory /home/*/public_html>
439    AllowOverride FileInfo AuthConfig Limit
440    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
441    <Limit GET POST OPTIONS PROPFIND>
442        Order allow,deny
443        Allow from all
444    </Limit>
445    <LimitExcept GET POST OPTIONS PROPFIND>
446        Order deny,allow
447        Deny from all
448    </LimitExcept>
449</Directory>
450
451#
452# DirectoryIndex: Name of the file or files to use as a pre-written HTML
453# directory index.  Separate multiple entries with spaces.
454#
455<IfModule mod_dir.c>
456    DirectoryIndex index.html
457</IfModule>
458
459#
460# AccessFileName: The name of the file to look for in each directory
461# for access control information.
462#
463AccessFileName .htaccess
464
465#
466# The following lines prevent .htaccess files from being viewed by
467# Web clients.  Since .htaccess files often contain authorization
468# information, access is disallowed for security reasons.  Comment
469# these lines out if you want Web visitors to see the contents of
470# .htaccess files.  If you change the AccessFileName directive above,
471# be sure to make the corresponding changes here.
472#
473# Also, folks tend to use names such as .htpasswd for password
474# files, so this will protect those as well.
475#
476<Files ~ "^\.ht">
477    Order allow,deny
478    Deny from all
479    Satisfy All
480</Files>
481
482#
483# CacheNegotiatedDocs: By default, Apache sends "Pragma: no-cache" with each
484# document that was negotiated on the basis of content. This asks proxy
485# servers not to cache the document. Uncommenting the following line disables
486# this behavior, and proxies will be allowed to cache the documents.
487#
488#CacheNegotiatedDocs
489
490#
491# UseCanonicalName:  (new for 1.3)  With this setting turned on, whenever
492# Apache needs to construct a self-referencing URL (a URL that refers back
493# to the server the response is coming from) it will use ServerName and
494# Port to form a "canonical" name.  With this setting off, Apache will
495# use the hostname:port that the client supplied, when possible.  This
496# also affects SERVER_NAME and SERVER_PORT in CGI scripts.
497#
498UseCanonicalName On
499
500#
501# TypesConfig describes where the mime.types file (or equivalent) is
502# to be found.
503#
504<IfModule mod_mime.c>
505    TypesConfig /etc/apache/mime.types
506</IfModule>
507
508#
509# DefaultType is the default MIME type the server will use for a document
510# if it cannot otherwise determine one, such as from filename extensions.
511# If your server contains mostly text or HTML documents, "text/plain" is
512# a good value.  If most of your content is binary, such as applications
513# or images, you may want to use "application/octet-stream" instead to
514# keep browsers from trying to display binary files as though they are
515# text.
516#
517DefaultType text/plain
518
519#
520# The mod_mime_magic module allows the server to use various hints from the
521# contents of the file itself to determine its type.  The MIMEMagicFile
522# directive tells the module where the hint definitions are located.
523# mod_mime_magic is not part of the default server (you have to add
524# it yourself with a LoadModule [see the DSO paragraph in the 'Global
525# Environment' section], or recompile the server and include mod_mime_magic
526# as part of the configuration), so it's enclosed in an <IfModule> container.
527# This means that the MIMEMagicFile directive will only be processed if the
528# module is part of the server.
529#
530<IfModule mod_mime_magic.c>
531    MIMEMagicFile /etc/apache/magic
532</IfModule>
533
534#
535# HostnameLookups: Log the names of clients or just their IP addresses
536# e.g., www.apache.org (on) or 204.62.129.132 (off).
537# The default is off because it'd be overall better for the net if people
538# had to knowingly turn this feature on, since enabling it means that
539# each client request will result in AT LEAST one lookup request to the
540# nameserver.
541#
542HostnameLookups Off
543
544#
545# ErrorLog: The location of the error log file.
546# If you do not specify an ErrorLog directive within a <VirtualHost>
547# container, error messages relating to that virtual host will be
548# logged here.  If you *do* define an error logfile for a <VirtualHost>
549# container, that host's errors will be logged there and not here.
550#
551ErrorLog /var/apache/logs/error_log
552
553#
554# LogLevel: Control the number of messages logged to the error_log.
555# Possible values include: debug, info, notice, warn, error, crit,
556# alert, emerg.
557#
558LogLevel warn
559
560#
561# The following directives define some format nicknames for use with
562# a CustomLog directive (see below).
563#
564LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
565LogFormat "%h %l %u %t \"%r\" %>s %b" common
566LogFormat "%{Referer}i -> %U" referer
567LogFormat "%{User-agent}i" agent
568
569#
570# The location and format of the access logfile (Common Logfile Format).
571# If you do not define any access logfiles within a <VirtualHost>
572# container, they will be logged here.  Contrariwise, if you *do*
573# define per-<VirtualHost> access logfiles, transactions will be
574# logged therein and *not* in this file.
575#
576CustomLog /var/apache/logs/access_log common
577
578#
579# If you would like to have agent and referer logfiles, uncomment the
580# following directives.
581#
582CustomLog /var/apache/logs/referer_log referer
583CustomLog /var/apache/logs/agent_log agent
584
585#
586# If you prefer a single logfile with access, agent, and referer information
587# (Combined Logfile Format) you can use the following directive.
588#
589CustomLog /var/apache/logs/access_log combined
590
591#
592# Optionally add a line containing the server version and virtual host
593# name to server-generated pages (error documents, FTP directory listings,
594# mod_status and mod_info output etc., but not CGI generated documents).
595# Set to "EMail" to also include a mailto: link to the ServerAdmin.
596# Set to one of:  On | Off | EMail
597#
598ServerSignature On
599
600# EBCDIC configuration:
601# (only for mainframes using the EBCDIC codeset, currently one of:
602# Fujitsu-Siemens' BS2000/OSD, IBM's OS/390 and IBM's TPF)!!
603# The following default configuration assumes that "text files"
604# are stored in EBCDIC (so that you can operate on them using the
605# normal POSIX tools like grep and sort) while "binary files" are
606# stored with identical octets as on an ASCII machine.
607#
608# The directives are evaluated in configuration file order, with
609# the EBCDICConvert directives applied before EBCDICConvertByType.
610#
611# If you want to have ASCII HTML documents and EBCDIC HTML documents
612# at the same time, you can use the file extension to force
613# conversion off for the ASCII documents:
614# > AddType       text/html .ahtml
615# > EBCDICConvert Off=InOut .ahtml
616#
617EBCDICConvertByType  On=InOut text/* message/* multipart/*
618EBCDICConvertByType  On=In    application/x-www-form-urlencoded
619EBCDICConvertByType  On=InOut application/postscript model/vrml
620EBCDICConvertByType Off=InOut */*
621
622
623#
624# Aliases: Add here as many aliases as you need (with no limit). The format is
625# Alias fakename realname
626#
627<IfModule mod_alias.c>
628
629Alias /manual/ "/usr/apache/htdocs/manual/"
630<Directory "/usr/apache/htdocs/manual" >
631    Options Indexes FollowSymLinks MultiViews
632    AllowOverride None
633</Directory>
634
635    #
636    # Note that if you include a trailing / on fakename then the server will
637    # require it to be present in the URL.  So "/icons" isn't aliased in this
638    # example, only "/icons/".  If the fakename is slash-terminated, then the
639    # realname must also be slash terminated, and if the fakename omits the
640    # trailing slash, the realname must also omit it.
641    #
642    Alias /icons/ "/var/apache/icons/"
643
644    <Directory "/var/apache/icons">
645        Options Indexes MultiViews
646        AllowOverride None
647        Order allow,deny
648        Allow from all
649    </Directory>
650
651    # This Alias will project the on-line documentation tree under /manual/
652    # even if you change the DocumentRoot. Comment it if you don't want to
653    # provide access to the on-line documentation.
654    #
655    Alias /manual/ "/var/apache/htdocs/manual/"
656
657    <Directory "/var/apache/htdocs/manual">
658        Options Indexes FollowSymlinks MultiViews
659        AllowOverride None
660        Order allow,deny
661        Allow from all
662    </Directory>
663
664    #
665    # ScriptAlias: This controls which directories contain server scripts.
666    # ScriptAliases are essentially the same as Aliases, except that
667    # documents in the realname directory are treated as applications and
668    # run by the server when requested rather than as documents sent to the client.
669    # The same rules about trailing "/" apply to ScriptAlias directives as to
670    # Alias.
671    #
672    ScriptAlias /cgi-bin/ "/var/apache/cgi-bin/"
673
674    #
675    # "/var/apache/cgi-bin" should be changed to whatever your ScriptAliased
676    # CGI directory exists, if you have that configured.
677    #
678    <Directory "/var/apache/cgi-bin">
679        AllowOverride None
680        Options None
681        Order allow,deny
682        Allow from all
683    </Directory>
684
685</IfModule>
686# End of aliases.
687
688#
689# Redirect allows you to tell clients about documents which used to exist in
690# your server's namespace, but do not anymore. This allows you to tell the
691# clients where to look for the relocated document.
692# Format: Redirect old-URI new-URL
693#
694
695#
696# Directives controlling the display of server-generated directory listings.
697#
698<IfModule mod_autoindex.c>
699
700    #
701    # FancyIndexing is whether you want fancy directory indexing or standard
702    #
703    IndexOptions FancyIndexing
704
705    #
706    # AddIcon* directives tell the server which icon to show for different
707    # files or filename extensions.  These are only displayed for
708    # FancyIndexed directories.
709    #
710    AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
711
712    AddIconByType (TXT,/icons/text.gif) text/*
713    AddIconByType (IMG,/icons/image2.gif) image/*
714    AddIconByType (SND,/icons/sound2.gif) audio/*
715    AddIconByType (VID,/icons/movie.gif) video/*
716
717    AddIcon /icons/binary.gif .bin .exe
718    AddIcon /icons/binhex.gif .hqx
719    AddIcon /icons/tar.gif .tar
720    AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
721    AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
722    AddIcon /icons/a.gif .ps .ai .eps
723    AddIcon /icons/layout.gif .html .shtml .htm .pdf
724    AddIcon /icons/text.gif .txt
725    AddIcon /icons/c.gif .c
726    AddIcon /icons/p.gif .pl .py
727    AddIcon /icons/f.gif .for
728    AddIcon /icons/dvi.gif .dvi
729    AddIcon /icons/uuencoded.gif .uu
730    AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
731    AddIcon /icons/tex.gif .tex
732    AddIcon /icons/bomb.gif core
733
734    AddIcon /icons/back.gif ..
735    AddIcon /icons/hand.right.gif README
736    AddIcon /icons/folder.gif ^^DIRECTORY^^
737    AddIcon /icons/blank.gif ^^BLANKICON^^
738
739    #
740    # DefaultIcon is which icon to show for files which do not have an icon
741    # explicitly set.
742    #
743    DefaultIcon /icons/unknown.gif
744
745    #
746    # AddDescription allows you to place a short description after a file in
747    # server-generated indexes.  These are only displayed for FancyIndexed
748    # directories.
749    # Format: AddDescription "description" filename
750    #
751    AddDescription "GZIP compressed document" .gz
752    AddDescription "tar archive" .tar
753    AddDescription "GZIP compressed tar archive" .tgz
754
755    #
756    # ReadmeName is the name of the README file the server will look for by
757    # default, and append to directory listings.
758    #
759    # HeaderName is the name of a file which should be prepended to
760    # directory indexes.
761    #
762    # If MultiViews are amongst the Options in effect, the server will
763    # first look for name.html and include it if found.  If name.html
764    # doesn't exist, the server will then look for name.txt and include
765    # it as plaintext if found.
766    #
767    ReadmeName README
768    HeaderName HEADER
769
770    #
771    # IndexIgnore is a set of filenames which directory indexing should ignore
772    # and not include in the listing.  Shell-style wildcarding is permitted.
773    #
774    IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
775
776</IfModule>
777# End of indexing directives.
778
779#
780# Document types.
781#
782<IfModule mod_mime.c>
783
784    #
785    # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress
786    # information on the fly. Note: Not all browsers support this.
787    # Despite the name similarity, the following Add* directives have nothing
788    # to do with the FancyIndexing customization directives above.
789    #
790    AddEncoding x-compress Z
791    AddEncoding x-gzip gz tgz
792
793    #
794    # AddLanguage allows you to specify the language of a document. You can
795    # then use content negotiation to give a browser a file in a language
796    # it can understand.
797    #
798    # Note 1: The suffix does not have to be the same as the language
799    # keyword --- those with documents in Polish (whose net-standard
800    # language code is pl) may wish to use "AddLanguage pl .po" to
801    # avoid the ambiguity with the common suffix for perl scripts.
802    #
803    # Note 2: The example entries below illustrate that in quite
804    # some cases the two character 'Language' abbreviation is not
805    # identical to the two character 'Country' code for its country,
806    # E.g. 'Danmark/dk' versus 'Danish/da'.
807    #
808    # Note 3: In the case of 'ltz' we violate the RFC by using a three char
809    # specifier. But there is 'work in progress' to fix this and get
810    # the reference data for rfc1766 cleaned up.
811    #
812    # Danish (da) - Dutch (nl) - English (en) - Estonian (ee)
813    # French (fr) - German (de) - Greek-Modern (el)
814    # Italian (it) - Korean (kr) - Norwegian (no) - Norwegian Nynorsk (nn)
815    # Portugese (pt) - Luxembourgeois* (ltz)
816    # Spanish (es) - Swedish (sv) - Catalan (ca) - Czech(cz)
817    # Polish (pl) - Brazilian Portuguese (pt-br) - Japanese (ja)
818    # Russian (ru)
819    #
820    AddLanguage da .dk
821    AddLanguage nl .nl
822    AddLanguage en .en
823    AddLanguage et .ee
824    AddLanguage fr .fr
825    AddLanguage de .de
826    AddLanguage el .el
827    AddLanguage he .he
828    AddCharset ISO-8859-8 .iso8859-8
829    AddLanguage it .it
830    AddLanguage ja .ja
831    AddCharset ISO-2022-JP .jis
832    AddLanguage kr .kr
833    AddCharset ISO-2022-KR .iso-kr
834    AddLanguage nn .nn
835    AddLanguage no .no
836    AddLanguage pl .po
837    AddCharset ISO-8859-2 .iso-pl
838    AddLanguage pt .pt
839    AddLanguage pt-br .pt-br
840    AddLanguage ltz .lu
841    AddLanguage ca .ca
842    AddLanguage es .es
843    AddLanguage sv .sv
844    AddLanguage cz .cz
845    AddLanguage ru .ru
846    AddLanguage zh-tw .tw
847    AddLanguage tw .tw
848    AddCharset Big5         .Big5    .big5
849    AddCharset WINDOWS-1251 .cp-1251
850    AddCharset CP866        .cp866
851    AddCharset ISO-8859-5   .iso-ru
852    AddCharset KOI8-R       .koi8-r
853    AddCharset UCS-2        .ucs2
854    AddCharset UCS-4        .ucs4
855    AddCharset UTF-8        .utf8
856
857    # LanguagePriority allows you to give precedence to some languages
858    # in case of a tie during content negotiation.
859    #
860    # Just list the languages in decreasing order of preference. We have
861    # more or less alphabetized them here. You probably want to change this.
862    #
863    <IfModule mod_negotiation.c>
864        LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
865    </IfModule>
866
867    #
868    # AddType allows you to tweak mime.types without actually editing it, or to
869    # make certain files to be certain types.
870    #
871    AddType application/x-tar .tgz
872
873    #
874    # AddHandler allows you to map certain file extensions to "handlers",
875    # actions unrelated to filetype. These can be either built into the server
876    # or added with the Action command (see below)
877    #
878    # If you want to use server side includes, or CGI outside
879    # ScriptAliased directories, uncomment the following lines.
880    #
881    # To use CGI scripts:
882    #
883    AddHandler cgi-script .cgi
884
885    #
886    # To use server-parsed HTML files
887    #
888    AddType text/html .shtml
889    AddHandler server-parsed .shtml .html
890
891    #
892    # Uncomment the following line to enable Apache's send-asis HTTP file
893    # feature
894    #
895    #AddHandler send-as-is asis
896
897    #
898    # If you wish to use server-parsed imagemap files, use
899    #
900    #AddHandler imap-file map
901
902    #
903    # To enable type maps, you might want to use
904    #
905    #AddHandler type-map var
906
907</IfModule>
908# End of document types.
909
910#
911# Action lets you define media types that will execute a script whenever
912# a matching file is called. This eliminates the need for repeated URL
913# pathnames for oft-used CGI file processors.
914# Format: Action media/type /cgi-script/location
915# Format: Action handler-name /cgi-script/location
916#
917
918#
919# MetaDir: specifies the name of the directory in which Apache can find
920# meta information files. These files contain additional HTTP headers
921# to include when sending the document
922#
923MetaDir .web
924
925#
926# MetaSuffix: specifies the file name suffix for the file containing the
927# meta information.
928#
929MetaSuffix .meta
930
931#
932# Customizable error response (Apache style)
933#  these come in three flavors
934#
935#    1) plain text
936#ErrorDocument 500 "The server made a boo boo.
937#  n.b.  the single leading (") marks it as text, it does not get output
938#
939#    2) local redirects
940#ErrorDocument 404 /missing.html
941#  to redirect to local URL /missing.html
942#ErrorDocument 404 /cgi-bin/missing_handler.pl
943#  N.B.: You can redirect to a script or a document using server-side-includes.
944#
945#    3) external redirects
946#ErrorDocument 402 http://some.other-server.com/subscription_info.html
947#  N.B.: Many of the environment variables associated with the original
948#  request will *not* be available to such a script.
949
950ErrorDocument 402 /errors/402.html
951ErrorDocument 403 /errors/403.html
952ErrorDocument 404 /errors/404.html
953ErrorDocument 500 /errors/500.html
954
955#
956# Customize behaviour based on the browser
957#
958<IfModule mod_setenvif.c>
959
960    #
961    # The following directives modify normal HTTP response behavior.
962    # The first directive disables keepalive for Netscape 2.x and browsers that
963    # spoof it. There are known problems with these browser implementations.
964    # The second directive is for Microsoft Internet Explorer 4.0b2
965    # which has a broken HTTP/1.1 implementation and does not properly
966    # support keepalive when it is used on 301 or 302 (redirect) responses.
967    #
968    BrowserMatch "Mozilla/2" nokeepalive
969    BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
970
971    #
972    # The following directive disables HTTP/1.1 responses to browsers which
973    # are in violation of the HTTP/1.0 spec by not being able to grok a
974    # basic 1.1 response.
975    #
976    BrowserMatch "RealPlayer 4\.0" force-response-1.0
977    BrowserMatch "Java/1\.0" force-response-1.0
978    BrowserMatch "JDK/1\.0" force-response-1.0
979
980</IfModule>
981# End of browser customization directives
982
983#
984# Allow server status reports, with the URL of http://servername/server-status
985# Change the ".your-domain.com" to match your domain to enable.
986#
987<Location /server-status>
988    SetHandler server-status
989    Order deny,allow
990    Deny from all
991    Allow from .your-domain.com
992</Location>
993
994#
995# Allow remote server configuration reports, with the URL of
996# http://servername/server-info (requires that mod_info.c be loaded).
997# Change the ".your-domain.com" to match your domain to enable.
998#
999<Location /server-info>
1000    SetHandler server-info
1001    Order deny,allow
1002    Deny from all
1003    Allow from .your-domain.com
1004</Location>
1005
1006#
1007# There have been reports of people trying to abuse an old bug from pre-1.1
1008# days.  This bug involved a CGI script distributed as a part of Apache.
1009# By uncommenting these lines you can redirect these attacks to a logging
1010# script on phf.apache.org.  Or, you can record them yourself, using the script
1011# support/phf_abuse_log.cgi.
1012#
1013<Location /cgi-bin/phf*>
1014    Deny from all
1015    ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi
1016</Location>
1017
1018#
1019# Proxy Server directives. Uncomment the following lines to
1020# enable the proxy server:
1021#
1022#<IfModule mod_proxy.c>
1023#    ProxyRequests On
1024
1025#    <Directory proxy:*>
1026#        Order deny,allow
1027#        Deny from all
1028#        Allow from .your-domain.com
1029#    </Directory>
1030
1031    #
1032    # Enable/disable the handling of HTTP/1.1 "Via:" headers.
1033    # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
1034    # Set to one of: Off | On | Full | Block
1035    #
1036#    ProxyVia On
1037
1038    #
1039    # To enable the cache as well, edit and uncomment the following lines:
1040    # (no cacheing without CacheRoot)
1041    #
1042#    CacheRoot "/var/apache/proxy"
1043#    CacheSize 5
1044#    CacheGcInterval 4
1045#    CacheMaxExpire 24
1046#    CacheLastModifiedFactor 0.1
1047#    CacheDefaultExpire 1
1048#    NoCache a-domain.com another-domain.edu joes.garage-sale.com
1049
1050#</IfModule>
1051# End of proxy directives.
1052
1053### Section 3: Virtual Hosts
1054#
1055# VirtualHost: If you want to maintain multiple domains/hostnames on your
1056# machine you can setup VirtualHost containers for them. Most configurations
1057# use only name-based virtual hosts so the server doesn't need to worry about
1058# IP addresses. This is indicated by the asterisks in the directives below.
1059#
1060# Please see the documentation at <URL:http://www.apache.org/docs/vhosts/>
1061# for further details before you try to setup virtual hosts.
1062#
1063# You may use the command line option '-S' to verify your virtual host
1064# configuration.
1065
1066#
1067# Use name-based virtual hosting.
1068#
1069NameVirtualHost *
1070
1071#
1072# VirtualHost example:
1073# Almost any Apache directive may go into a VirtualHost container.
1074# The first VirtualHost section is used for requests without a known
1075# server name.
1076#
1077<VirtualHost *>
1078    ServerAdmin webmaster@dummy-host.example.com
1079    DocumentRoot /www/docs/dummy-host.example.com
1080    ServerName dummy-host.example.com
1081    ErrorLog logs/dummy-host.example.com-error_log
1082    CustomLog logs/dummy-host.example.com-access_log common
1083</VirtualHost>
1084
1085<VirtualHost *>
1086    ServerAdmin webmaster@dummy-server.example.com
1087    DocumentRoot /www/docs/dummy-server.example.com
1088    ServerName dummy-server.example.com
1089    ErrorLog logs/dummy-server.example.com-error_log
1090    CustomLog logs/dummy-server.example.com-access_log common
1091</VirtualHost>
1092
1093#<IfModule mod_perl.c>
1094#
1095#<Location /perl-status>
1096#     SetHandler perl-script
1097#     PerlHandler Apache::Status
1098#     order deny,allow
1099#     deny from all
1100#     allow from yourhost
1101#</Location>
1102#</IfModule>
1103