Attached is a first draft of a page which documents some of the
server-wide configuration parameters from core.html.  This is a
replacement for my proposal of sorting the core.html directive index by
"type", and also is another in what will hopefully be a large series of
"task-specific" docs.

These docs are really not designed for the "newbie", since they
are very short and assume some pre-existing knowledge.  However,
they do give people a fighting chance at figuring out some
of the features of Apache without trying to read the module docs from top
to bottom.

Suggestions/comments/etc are VERY appreciated.

-- 
Joshua Slive
[EMAIL PROTECTED]
http://finance.commerce.ubc.ca/~slive/
Phone: (604) 822-1871
Title: Server-Wide Configurationr

Server-Wide Configuration


Server Identification

Related Directives

ServerName
ServerAdmin
ServerSignature
ServerTokens
UseCanonicalName

The ServerAdmin and ServerTokens directives control what information about the server will be presented in server-generated documents like error messages. The ServerTokens directive sets the value of the Server response HTTP header field. The ServerName and UseCanonicalName directives are used by the server to determine how to construct self-referential URLs.


File Locations

Related Directives

CoreDumpDirectory
DocumentRoot
ErrorLog
Lockfile
PidFile
ScoreBoardFile
ServerRoot

These directives control the locations of the various files that Apache needs for proper operation.


Process Creation

Related Directives

BS2000Account
Group
MaxClients
MaxRequestsPerChild
MaxSpareServers
MinSpareServers
ServerType
StartServers
ThreadsPerChild
User

When ServerType is set to its recommended value of Standalone, Apache 1.3 for Unix is a pre-forking web server. A single control process is responsible for launching child processes which listen for connections and serve them when they arrive. Apache always tries to maintain several spare or idle server processes, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new child processes to be forked before their requests can be served.

While the parent process is usually started as root under Unix in order to bind to port 80, the child processes are launched by Apache as a less-priveleged user. The User and Group directives are used to set the privileges of the Apache child processes. The child processes must be able to read all the content that will be served, but should have as few privileges beyond that as possible.

The StartServers, MinSpareServers, MaxSpareServers, and MaxServers regulate how the parent process creates children to serve requests. In general, Apache is very self-regulating, so most sites do not need to adjust these directives from their default values. Sites which need to serve more than 256 simultaneous requests may need to increase MaxClients, while sites with limited memory may need to decrease MaxClients to keep the server from thrashing.

MaxRequestsPerChild controls how frequently the server recycles processes by killing old ones and launching new ones.

Under Windows, Apache launches one control process and one child process. The child process creates multiple threads to serve requests. The number of threads is controlled by the ThreadsPerChild directive.


Network Configuration

Related Directives

BindAddress
KeepAlive
KeepAliveTimeout
Listen
ListenBackLog
MaxKeepAliveRequests
Port
SendBufferSize
TimeOut

When Apache starts, it connects to some port and address on the local machine and waits for incoming requests. By default, it listens to all addresses on the machine, and to the port as specified by the Port directive in the server configuration. However, it can be told to listen to more the one port, or to listen to only selected addresses, or a combination. This is often combined with the Virtual Host feature which determines how Apache responds to different IP addresses, hostnames and ports.

There are two directives used to restrict or specify which addresses and ports Apache listens to. The BindAddress directive is used to restrict the server to listening to a single IP address. The Listen directive can be used to specify multiple IP addresses and/or Ports to which Apache will listen.

The ListenBackLog, SendBufferSize, and TimeOut directives are used to adjust how Apache interacts with the network.

The KeepAlive, KeepAliveTimeout, and MaxKeepAliveRequests directives are used to configure how Apache handles persistent connections.


Limiting Resource Usage

Related Directives

LimitRequestBody
LimitRequestFields
LimitRequestFieldsize
LimitRequestLine
RLimitCPU
RLimitMEM
RLimitNPROC
ThreadStackSize

The Limit* directives are used to place limits on the amount of resources Apache will use in reading requests from clients. By limiting these values, some kinds of denial of service attacks can be mitigated.

The RLimit* directives are used to limit the amount of resources which can be used by processes forked off from the Apache children. In particular, this will control resources used by CGI scripts and SSI exec commands.

The ThreadStackSize directive is used only on Netware to control the stock size.


Server Defaults

Related Directives

AddDefaultCharset
ContentDigest
DefaultType
ErrorDocument
HostNameLookups
IdentityCheck
LogLevel
Options
ScriptInterpreterSource

Reply via email to