httpd-std.conf.in revision 8cfbcde8e416fd60132dd4324c42a5098da156cf
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# Based upon the NCSA server configuration files originally by Rob McCool.
431571057e88a650a974adec93ea4bb5173b6213Felix Gabriel Mance# This is the main Apache server configuration file. It contains the
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# configuration directives that give the server its instructions.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# See <URL:http://httpd.apache.org/docs-2.1/> for detailed information about
431571057e88a650a974adec93ea4bb5173b6213Felix Gabriel Mance# the directives.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# Do NOT simply read the instructions in here without understanding
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# what they do. They're here only as hints or reminders. If you are unsure
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# consult the online docs. You have been warned.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# The configuration directives are grouped into three basic sections:
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# 1. Directives that control the operation of the Apache server process as a
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# whole (the 'global environment').
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# 2. Directives that define the parameters of the 'main' or 'default' server,
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# which responds to requests that aren't handled by a virtual host.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# These directives also provide default values for the settings
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# of all virtual hosts.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# 3. Settings for virtual hosts, which allow Web requests to be sent to
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# different IP addresses or hostnames and have them handled by the
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# same Apache server process.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# Configuration and logfile names: If the filenames you specify for many
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# of the server's control files begin with "/" (or "drive:/" for Win32), the
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# server will use that explicit path. If the filenames do *not* begin
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# with "/", the value of ServerRoot is prepended -- so "@rel_logfiledir@/foo.log"
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# with ServerRoot set to "@@ServerRoot@@" will be interpreted by the
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# server as "@@ServerRoot@@/@rel_logfiledir@/foo.log".
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu### Section 1: Global Environment
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# The directives in this section affect the overall operation of Apache,
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# such as the number of concurrent requests it can handle or where it
fc05327b875b5723b6c17849b83477f29ec12c90Felix Gabriel Mance# can find its configuration files.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# ServerRoot: The top of the directory tree under which the server's
0dd6e7830de0887c9a12356447975a826b3b3db2Christian Maeder# configuration, error, and log files are kept.
e0f1794e365dd347e97b37d7d22b2fce27296fa1Christian Maeder# NOTE! If you intend to place this on an NFS (or otherwise network)
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# mounted filesystem then please read the LockFile documentation (available
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# at <URL:http://httpd.apache.org/docs-2.1/mod/mpm_common.html#lockfile>);
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# you will save yourself a lot of trouble.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# Do NOT add a slash at the end of the directory path.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae BungiuServerRoot "@@ServerRoot@@"
27fdf879983dd28e211b41f3be6c0e930b7c816bFelix Gabriel Mance# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu#LockFile @rel_logfiledir@/accept.lock
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# ScoreBoardFile: File used to store internal server process information.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# If unspecified (the default), the scoreboard will be stored in an
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# anonymous shared memory segment, and will be unavailable to third-party
be00381168b3f10192afabbba136fb06d3a9f358Christian Maeder# applications.
be00381168b3f10192afabbba136fb06d3a9f358Christian Maeder# If specified, ensure that no two invocations of Apache share the same
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
27fdf879983dd28e211b41f3be6c0e930b7c816bFelix Gabriel Mance#ScoreBoardFile @rel_logfiledir@/apache_runtime_status
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mance# PidFile: The file in which the server should record its process
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mance# identification number when it starts.
27fdf879983dd28e211b41f3be6c0e930b7c816bFelix Gabriel MancePidFile @rel_runtimedir@/httpd.pid
0dd6e7830de0887c9a12356447975a826b3b3db2Christian Maeder# Timeout: The number of seconds before receives and sends time out.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# KeepAlive: Whether or not to allow persistent connections (more than
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# one request per connection). Set to "Off" to deactivate.
9475501a6acf48434052d9e6f4a05ed6681eaaabFrancisc Nicolae Bungiu# MaxKeepAliveRequests: The maximum number of requests to allow
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# during a persistent connection. Set to 0 to allow an unlimited amount.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# We recommend you leave this number high, for maximum performance.
60f30f0eeeacdfc1e0dfe39664373ddf5a0675adFelix Gabriel ManceMaxKeepAliveRequests 100
0dd6e7830de0887c9a12356447975a826b3b3db2Christian Maeder# KeepAliveTimeout: Number of seconds to wait for the next request from the
60f30f0eeeacdfc1e0dfe39664373ddf5a0675adFelix Gabriel Mance# same client on the same connection.
0dd6e7830de0887c9a12356447975a826b3b3db2Christian MaederKeepAliveTimeout 15
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mance## Server-Pool Size Regulation (MPM specific)
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# StartServers: number of server processes to start
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MinSpareServers: minimum number of server processes which are kept spare
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxSpareServers: maximum number of server processes which are kept spare
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxClients: maximum number of server processes allowed to start
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxRequestsPerChild: maximum number of requests a server process serves
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MinSpareServers 5
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxSpareServers 10
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxRequestsPerChild 0
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# StartServers: initial number of server processes to start
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxClients: maximum number of simultaneous client connections
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MinSpareThreads: minimum number of worker threads which are kept spare
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxSpareThreads: maximum number of worker threads which are kept spare
31e9d2a02e15b7dbc157e0d3fb3b84f6c8666482Christian Maeder# ThreadsPerChild: constant number of worker threads in each server process
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxRequestsPerChild: maximum number of requests a server process serves
656f17ae9b7610ff2de1b6eedeeadea0c3bcdc8dChristian Maeder StartServers 2
d3cb3401882f6956de016f8eecbec1cd3b868acbFelix Gabriel Mance MaxClients 150
d3cb3401882f6956de016f8eecbec1cd3b868acbFelix Gabriel Mance MinSpareThreads 25
d3cb3401882f6956de016f8eecbec1cd3b868acbFelix Gabriel Mance MaxSpareThreads 75
d3cb3401882f6956de016f8eecbec1cd3b868acbFelix Gabriel Mance ThreadsPerChild 25
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxRequestsPerChild 0
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# NumServers: constant number of server processes
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# StartThreads: initial number of worker threads in each server process
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MinSpareThreads: minimum number of worker threads which are kept spare
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxSpareThreads: maximum number of worker threads which are kept spare
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxThreadsPerChild: maximum number of worker threads in each server process
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxRequestsPerChild: maximum number of connections per server process
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MinSpareThreads 5
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxSpareThreads 10
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxThreadsPerChild 20
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxRequestsPerChild 0
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# ThreadsPerChild: constant number of worker threads in the server process
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxRequestsPerChild: maximum number of requests a server process serves
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu ThreadsPerChild 250
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxRequestsPerChild 0
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# StartThreads: how many threads do we initially spawn?
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxClients: max number of threads we can have (1 thread == 1 client)
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxRequestsPerThread: maximum number of requests each thread will process
b84c87f199dc287d235d7dad6ea344f6912ef531Christian Maeder StartThreads 10
b84c87f199dc287d235d7dad6ea344f6912ef531Christian Maeder MaxClients 50
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxRequestsPerThread 10000
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# ThreadStackSize: Stack size allocated for each worker thread
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# StartThreads: Number of worker threads launched at server startup
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MinSpareThreads: Minimum number of idle threads, to handle request spikes
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxSpareThreads: Maximum number of idle threads
624f8c31bd8d6746b93f4b5966aa6fc7680fefc5Felix Gabriel Mance# MaxThreads: Maximum number of worker threads alive at the same time
624f8c31bd8d6746b93f4b5966aa6fc7680fefc5Felix Gabriel Mance# MaxRequestsPerChild: Maximum number of requests a thread serves. It is
624f8c31bd8d6746b93f4b5966aa6fc7680fefc5Felix Gabriel Mance# recommended that the default value of 0 be set for this
624f8c31bd8d6746b93f4b5966aa6fc7680fefc5Felix Gabriel Mance# directive on NetWare. This will allow the thread to
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# continue to service requests indefinitely.
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu ThreadStackSize 65536
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu StartThreads 250
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MinSpareThreads 25
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxSpareThreads 250
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu MaxThreads 1000
b84c87f199dc287d235d7dad6ea344f6912ef531Christian Maeder MaxRequestsPerChild 0
624f8c31bd8d6746b93f4b5966aa6fc7680fefc5Felix Gabriel Mance# StartServers: Number of server processes to maintain
624f8c31bd8d6746b93f4b5966aa6fc7680fefc5Felix Gabriel Mance# MinSpareThreads: Minimum number of idle threads per process,
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# to handle request spikes
ee93ea764a2b8189253e912c8447f9419033f6d4Francisc Nicolae Bungiu# MaxSpareThreads: Maximum number of idle threads per process
d0f58d27c2536eba454d8f77de8617bc6a2c99cdFelix Gabriel Mance# MaxRequestsPerChild: Maximum number of connections per server process
431571057e88a650a974adec93ea4bb5173b6213Felix Gabriel Mance StartServers 2
# Listen: Allows you to bind Apache to specific IP addresses and/or
# LoadModule foo_module modules/mod_foo.so
<IfModule !mpm_winnt.c>
<IfModule !mpm_netware.c>
# as error documents. e.g. admin@your-domain.com
#ServerName new.host.name:80
# to which services and features are allowed and/or disabled in that
<IfModule mod_userdir.c>
# The index.html.var file (a type-map) is used to deliver content-
<IfModule mod_dir.c>
<IfModule mod_mime.c>
# TypesConfig describes where the mime.types file (or equivalent) is
TypesConfig @rel_sysconfdir@/mime.types
# If your server contains mostly text or HTML documents, "text/plain" is
# or images, you may want to use "application/octet-stream" instead to
DefaultType text/plain
<IfModule mod_mime_magic.c>
# http://httpd.apache.org/docs-2.1/mod/core.html#enablemmap
# http://httpd.apache.org/docs-2.1/mod/core.html#enablesendfile
<IfModule mod_log_config.c>
# You need to enable mod_logio.c to use %I and %O
<IfModule mod_alias.c>
# This should be changed to the ServerRoot/manual/. The alias provides
<IfModule mod_cgid.c>
# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
# Redirect permanent /foo http://www.example.com/bar
<IfModule mod_autoindex.c>
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
<IfModule mod_mime.c>
<IfModule mod_negotiation.c>
<IfModule mod_mime.c>
# is in iso-8859-1 (latin1) unless specified otherwise i.e. you
# See http://www.iana.org/assignments/character-sets for the
# file mime.types for specific file types.
AddType application/x-tar .tgz
AddType image/x-icon .ico
#AddType text/html .shtml
# Format: Action handler-name /cgi-script/location
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
# default HTTP_<error>.html.var files by adding the line:
# @exp_errordir@/include/ files and copying them to /your/include/path/,
# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
# ErrorDocument 410 /error/HTTP_GONE.html.var
# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
<IfModule mod_setenvif.c>
<IfModule mod_status.c>
# with the URL of http://servername/server-status
# Change the ".example.com" to match your domain to enable.
# Allow from .example.com
<IfModule mod_info.c>
# Change the ".example.com" to match your domain to enable.
# Allow from .example.com
<IfModule mod_proxy.c>
# Allow from .example.com
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
<IfModule mod_ssl.c>
Include @rel_sysconfdir@/ssl.conf
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log
# CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common