Вы находитесь на странице: 1из 6

APACHE MODULES

CORE FEATURES AND MULTI-PROCESSING MODULES


core mpm_netware Implements a non-threaded, pre-forking web server
Core Apache HTTP Server features that are always available Multi-Processing Module implementing an exclusively threaded threadpool
mpm_common web server optimized for Novell NetWare Yet another experimental variant of the standard worker MPM
A collection of directives that are implemented by more than mpmt_os2 mpm_winnt
one multi-processing module (MPM) Hybrid multi-process, multi-threaded MPM for OS/2 This Multi-Processing Module is optimized for Windows NT.
beos perchild worker
This Multi-Processing Module is optimized for BeOS. Multi-Processing Module allowing for daemon processes serving Multi-Processing Module implementing a hybrid multi-threaded
leader requests to be assigned a variety of different userids multi-process web server
An experimental variant of the standard worker MPM prefork

OTHER MODULES
mod_access mod_disk_cache mod_mime_magic
Provides access control based on client hostname, IP address, or Content cache storage manager keyed to URIs Det. the MIME type of a file by looking at a few byts of its contnt
other characteristics of the client request. mod_dumpio mod_negotiation
mod_actions Dumps all I/O to error log as desired. Provides for content negotiation
This module provides for executing CGI scripts based on media mod_echo mod_nw_ssl
type or request method. A simple echo server to illustrate protocol modules Enable SSL encryption for NetWare
mod_alias mod_env mod_proxy
Provides for mapping different parts of the host filesystem in the Modifies the environment which is passed to CGI scripts and SSI HTTP/1.1 proxy/gateway server
document tree and for URL redirection pages mod_proxy_connect
mod_asis mod_example mod_proxy extension for CONNECT request handling
Sends files that contain their own HTTP headers Illustrates the Apache module API mod_proxy_ftp
mod_auth mod_expires FTP support module for mod_proxy
User authentication using text files Generation of Expires and Cache-Control HTTP headers according mod_proxy_http
mod_auth_anon to user-specified criteria HTTP support module for mod_proxy
Allows "anonymous" user access to authenticated areas mod_ext_filter mod_rewrite
mod_auth_dbm Pass the response body through an external program before Provides a rule-based rewriting engine to rewrite requested URLs
Provides for user authentication using DBM files delivery to the client on the fly
mod_auth_digest mod_file_cache mod_setenvif
User authentication using MD5 Digest Authentication. Caches a static list of files in memory Allows the setting of environment variables based on
mod_`auth_ldap mod_headers characteristics of the request
Allows an LDAP directory to be used to store the database for Customization of HTTP request and response headers mod_so
HTTP Basic authentication. mod_imap Loading of executable code and modules into the server at start-
mod_autoindex Server-side imagemap processing up or restart time
Generates directory indexes, automatically, similar to the Unix ls mod_include mod_speling
command or the Win32 dir shell command Server-parsed html documents (Server Side Includes) Attempts to correct mistaken URLs that users might have entered
mod_cache mod_info by ignoring capitalization and by allowing up to one misspelling
Content cache keyed to URIs. Provides a comprehensive overview of the server configuration mod_ssl
mod_cern_meta mod_isapi Strong cryptography using the Secure Sockets Layer (SSL) and
CERN httpd metafile semantics ISAPI Extensions within Apache for Windows Transport Layer Security (TLS) protocols
mod_cgi mod_ldap mod_status
Execution of CGI scripts LDAP connection pooling and result caching services for use by Provides information on server activity and performance
mod_cgid other LDAP modules mod_suexec
Execution of CGI scripts using an external CGI daemon mod_log_config Allows CGI scripts to run as a specified user and Group
mod_charset_lite Logging of the requests made to the server mod_unique_id
Specify character set translation or recoding mod_log_forensic Provides an environment variable with a unique identifier for
mod_dav Forensic Logging of the requests made to the server each request
Distributed Authoring and Versioning (WebDAV) functionality mod_logio mod_userdir
mod_dav_fs Logging of input and output bytes per request User-specific directories
filesystem provider for mod_dav mod_mem_cache mod_usertrack
mod_deflate Content cache keyed to URIs Clickstream logging of user activity on a site
Compress content before it is delivered to the client mod_mime mod_version
mod_dir Associates the requested filename's extensions with the file's Version dependent configuration
Provides for "trailing slash" redirects and serving directory index behavior (handlers and filters) and content (mime-type, mod_vhost_alias
files language, character set and encoding) Provides for dynamically configured mass virtual hosting
APACHE DIRECTIVES
AcceptFilter CacheNegotiatedDocs IndexOrderDefault RefererLog
AcceptMutex CacheRoot ISAPIReadAheadBuffer RemoveEncoding
AccessConfig CacheSize ISAPILogNotSupported RemoveHandler
AccessFileName CGICommandArgs ISAPIAppendLogToErrors RemoveType
Action CheckSpelling ISAPIAppendLogToQuery Require
AddAlt ClearModuleList KeepAlive ResourceConfig
AddAltByEncoding ContentDigest KeepAliveTimeout RewriteBase
AddAltByType CookieDomain LanguagePriority RewriteCond
AddCharset CookieExpires <Limit> RewriteEngine
AddDefaultCharset CookieFormat <LimitExcept> RewriteLock
AddDescription CookieLog (mod_cookies) LimitInternalRecursion RewriteLog
AddEncoding CookieLog (mod_log_config) LimitRequestBody RewriteLogLevel
AddHandler CookiePrefix LimitRequestFields RewriteMap
AddIcon CookieStyle LimitRequestFieldsize RewriteOptions
AddIconByEncoding CookieTracking LimitRequestLine RewriteRule
AddIconByType CoreDumpDirectory Listen RLimitCPU
AddLanguage CustomLog ListenBacklog RLimitMEM
AddModule DefaultIcon LoadFile RLimitNPROC
AddModuleInfo DefaultLanguage LoadModule Satisfy
AddType DefaultType <Location> ScoreBoardFile
AgentLog Deny <LocationMatch> Script
Alias <Directory> LockFile ScriptAlias
AliasMatch <DirectoryMatch> LogFormat ScriptAliasMatch
Allow DirectoryIndex LogLevel ScriptInterpreterSource
AllowCONNECT DocumentRoot MaxClients ScriptLog
AllowOverride EBCDICConvert MaxKeepAliveRequests ScriptLogBuffer
Anonymous EBCDICConvertByType MaxRequestsPerChild ScriptLogLength
Anonymous_Authoritative EBCDICKludge MaxSpareServers SendBufferSize
Anonymous_LogEmail EnableExceptionHook MetaDir ServerAdmin
Anonymous_MustGiveEmail ErrorDocument MetaFiles ServerAlias
Anonymous_NoUserID ErrorHeader MetaSuffix ServerName
Anonymous_VerifyEmail ErrorLog MimeMagicFile ServerPath
AuthAuthoritative Example MinSpareServers ServerRoot
AuthDBAuthoritative ExpiresActive MMapFile ServerSignature
AuthDBGroupFile ExpiresByType NameVirtualHost ServerTokens
AuthDBMAuthoritative ExpiresDefault NoCache ServerType
AuthDBMGroupFile ExtendedStatus Options SetEnv
AuthDBMGroupFile FancyIndexing Order SetEnvIf
AuthDBUserFile FileETag PassEnv SetEnvIfNoCase
AuthDBMUserFile <Files> PidFile SetHandler
AuthDigestFile <FilesMatch> Port ShmemUIDisUser
AuthGroupFile ForceType ProtocolReqCheck StartServers
AuthName ForensicLog ProxyBlock ThreadsPerChild
AuthType Group ProxyDomain TimeOut
AuthUserFile Header ProxyPass TraceEnable
BindAddress HeaderName ProxyPassReverse TransferLog
BrowserMatch HostnameLookups ProxyReceiveBufferSize TypesConfig
BrowserMatchNoCase IdentityCheck ProxyRemote UnsetEnv
BS2000Account <IfDefine> ProxyRequests UseCanonicalName
CacheDefaultExpire <IfModule> ProxyVia User
CacheDirLength ImapBase ReadmeName UserDir
CacheDirLevels ImapDefault Redirect <VirtualHost>
CacheForceCompletion ImapMenu RedirectMatch VirtualDocumentRoot
CacheGcInterval Include RedirectPermanent VirtualDocumentRootIP
CacheLastModifiedFactor IndexIgnore RedirectTemp VirtualScriptAlias
CacheMaxExpire IndexOptions RefererIgnore VirtualScriptAliasIP & XBitHack
APACHE MPM COMMON DIRECTIVES
Description: A collection of directives that are implemented by more than one multi-processing module (MPM)

AcceptMutex Directive CoreDumpDirectory Directive Group Directive


Description: Method that Apache uses to serialize multiple children Description: Directory where Apache attempts to switch before Description: Group under which the server will answer requests
accepting requests on network sockets dumping core Syntax: Group unix-group
Syntax: AcceptMutex Default|method Syntax: CoreDumpDirectory directory Default: Group #-1
Default: AcceptMutex Default Default: See usage for the default setting Context: server config
Context: server config Context: server config Status: MPM
Status: MPM Status: MPM Module: beos, leader, mpmt_os2, perchild, prefork, threadpool,
Module: leader, perchild, prefork, threadpool, worker Module: beos, leader, mpm_winnt, perchild, prefork, threadpool, worker
worker Compatibility: Only valid in global server config since Apache 2.0
The AcceptMutex directives sets the method that Apache uses to
serialize multiple children accepting requests on network sockets. This controls the directory to which Apache attempts to switch The Group directive sets the group under which the server will
Prior to Apache 2.0, the method was selectable only at compile before dumping core. The default is in the ServerRoot directory, answer requests. In order to use this directive, the server must be
time. The optimal method to use is highly architecture and platform however since this should not be writable by the user the server run initially as root. If you start the server as a non-root user, it will
dependent. For further details, see the performance tuning runs as, core dumps won't normally get written. If you want a core fail to change to the specified group, and will instead continue to
documentation. dump for debugging, you can use this directive to place it in a run as the group of the original user. Unix-group is one of:
If this directive is set to Default, then the compile-time selected different location. A group name
default will be used. Other possible methods are listed below. Note Core Dumps on Linux Refers to the given group by name.
that not all methods are available on all platforms. If a method is If Apache starts as root and switches to another user, the Linux # followed by a group number.
specified which is not available, a message will be written to the kernel disables core dumps even if the directory is writable for the Refers to a group by its number.
error log listing the available methods. process. Apache (2.0.46 and later) reenables core dumps on Linux Example
flock 2.4 and beyond, but only if you explicitly configure a Group www-group
uses the flock(2) system call to lock the file defined by the CoreDumpDirectory. It is recommended that you set up a new group specifically for
LockFile directive. running the server. Some admins use user nobody, but this is not
fcntl EnableExceptionHook Directive always possible or desirable.
uses the fcntl(2) system call to lock the file defined by the Descrptn: Enables a hook that runs exception handlers after a crash Security
LockFile directive. Syntax: EnableExceptionHook On|Off Don't set Group (or User) to root unless you know exactly what
posixsem Default: EnableExceptionHook Off you are doing, and what the dangers are.
uses POSIX compatible semaphores to implement the mutex. Context: server config Special note: Use of this directive in <VirtualHost> is no longer
pthread Status: MPM supported. To configure your server for suexec use
uses POSIX mutexes as implemented by the POSIX Threads Module: leader, perchild, prefork, threadpool, worker SuexecUserGroup.
(PThreads) specification. Compatibility: Available in version 2.0.49 and later Note: Although the Group directive is present in the beos and
sysvsem mpmt_os2 MPMs, it is actually a no-op there and only exists for
uses SySV-style semaphores to implement the mutex. For safety reasons this directive is only available if the server compatibility reasons.
was configured with the --enable-exception-hook option. It enables
If you want to find out the compile time chosen default for your a hook that allows external modules to plug in and do something MaxMemFree Directive
system, you may set your LogLevel to debug. Then the default after a child crashed. Description: Maximum amount of memory that the main allocator is
AcceptMutex will be written into the ErrorLog. There are already two modules, mod_whatkilledus and allowed to hold without calling free()
mod_backtrace that make use of this hook. Please have a look at Syntax: MaxMemFree KBytes
BS2000Account Directive Jeff Trawick's EnableExceptionHook site for more information about Default: MaxMemFree 0
Description: Define the non-privileged account on BS2000 machines these. Context: server config
Syntax: BS2000Account account Status: MPM
Context: server config ReceiveBufferSize Directive Module: beos, leader, mpm_netware, prefork, threadpool, worker,
Status: MPM Description: TCP receive buffer size mpm_winnt
Module: perchild, prefork Syntax: ReceiveBufferSize bytes
Compatibility: Only available for BS2000 machines Default: ReceiveBufferSize 0 The MaxMemFree directive sets the maximum number of free
Context: server config Kbytes that the main allocator is allowed to hold without calling
The BS2000Account directive is available for BS2000 hosts only. It Status: MPM free(). When not set, or when set to zero, the threshold will be set
must be used to define the account # for the non-privileged apache Module: beos, leader, mpm_netware, mpm_winnt, mpmt_os2, to unlimited.
server user (which was configured using the User directive). This is perchild, prefork, threadpool, worker
required by the BS2000 POSIX subsystem (to change the underlying
BS2000 task environment by performing a sub-LOGON) to prevent The server will set the TCP receive buffer size to the number of
CGI scripts from accessing resources of the privileged account which bytes specified.
started the server, usually SYSROOT. If set to the value of 0, the server will use the OS default.
Note: Only one BS2000Account directive can be used.
Listen Directive LockFile Directive MaxClients Directive
Description: IP addresses and ports that the server listens to Description: Location of the accept serialization lock file Description: Maximum number of connections that will be processed
Syntax: Listen [IP-address:]portnumber Syntax: LockFile filename simultaneously
Context: server config Default: LockFile logs/accept.lock Syntax: MaxClients number
Status: MPM Context: server config Default: See usage for details
Module: beos, leader, mpm_netware, mpm_winnt, mpmt_os2, Status: MPM Context: server config
perchild, prefork, threadpool, worker Module: leader, perchild, prefork, threadpool, worker Status: MPM
Compatibility: Required directive since Apache 2.0 Module: beos, leader, prefork, threadpool, worker
The LockFile directive sets the path to the lockfile used when
The Listen directive instructs Apache to listen to only specific IP Apache is used with an AcceptMutex value of either fcntl or flock. The MaxClients directive sets the limit on the number of
addresses or ports; by default it responds to requests on all IP This directive should normally be left at its default value. The main simultaneous requests that will be served. Any connection attempts
interfaces. Listen is now a required directive. If it is not in the reason for changing it is if the logs directory is NFS mounted, since over the MaxClients limit will normally be queued, up to a number
config file, the server will fail to start. This is a change from the lockfile must be stored on a local disk. The PID of the main based on the ListenBacklog directive. Once a child process is freed
previous versions of Apache. server process is automatically appended to the filename. at the end of a different request, the connection will then be
The Listen directive tells the server to accept incoming requests Security serviced.
on the specified port or address-and-port combination. If only a It is best to avoid putting this file in a world writable directory For non-threaded servers (i.e., prefork), MaxClients translates
port number is specified, the server listens to the given port on all such as /var/tmp because someone could create a denial of service into the maximum number of child processes that will be launched
interfaces. If an IP address is given as well as a port, the server will attack and prevent the server from starting by creating a lockfile to serve requests. The default value is 256; to increase it, you must
listen on the given port and interface. with the same name as the one the server will try to create. also raise ServerLimit.
Multiple Listen directives may be used to specify a number of For threaded and hybrid servers (e.g. beos or worker) MaxClients
addresses and ports to listen to. The server will respond to requests ScoreBoardFile Directive restricts the total number of threads that will be available to serve
from any of the listed addresses and ports. Description: Location of the file used to store coordination data for clients. The default value for beos is 50. For hybrid MPMs the
For example, to make the server accept connections on both the child processes default value is 16 (ServerLimit) multiplied by the value of 25
port 80 and port 8000, use: Syntax: ScoreBoardFile file-path (ThreadsPerChild). Therefore, to increase MaxClients to a value that
Listen 80 Default: ScoreBoardFile logs/apache_status requires more than 16 processes, you must also raise ServerLimit.
Listen 8000 Context: server config
To make the server accept connections on two specified Status: MPM MaxRequestsPerChild Directive
interfaces and port numbers, use Module: beos, leader, mpm_winnt, perchild, prefork, threadpool, Description: Limit on the number of requests that an individual
Listen 192.170.2.1:80 worker child server will handle during its life
Listen 192.170.2.5:8000 Syntax: MaxRequestsPerChild number
IPv6 addresses must be surrounded in square brackets, as in the Apache uses a scoreboard to communicate between its parent Default: MaxRequestsPerChild 10000
following example: and child processes. Some architectures require a file to facilitate Context: server config
Listen [2001:db8::a00:20ff:fea7:ccea]:80 this communication. If the file is left unspecified, Apache first Status: MPM
Error condition attempts to create the scoreboard entirely in memory (using Module: leader, mpm_netware, mpm_winnt, mpmt_os2, perchild,
Multiple Listen directives for the same ip address and port will anonymous shared memory) and, failing that, will attempt to create prefork, threadpool, worker
result in an Address already in use error message. the file on disk (using file-based shared memory). Specifying this
directive causes Apache to always create the file on the disk. The MaxRequestsPerChild directive sets the limit on the number
ListenBackLog Directive Example: ScoreBoardFile /var/run/apache_status of requests that an individual child server process will handle. After
Description: Maximum length of the queue of pending connections File-based shared memory is useful for third-party applications MaxRequestsPerChild requests, the child process will die. If
Syntax: ListenBacklog backlog that require direct access to the scoreboard. MaxRequestsPerChild is 0, then the process will never expire.
Default: ListenBacklog 511 If you use a ScoreBoardFile then you may see improved speed by Different default values
Context: server config placing it on a RAM disk. But be careful that you heed the same The default value for mpm_netware and mpm_winnt is 0.
Status: MPM warnings about log file placement and security. Setting MaxRequestsPerChild to a non-zero value limits the
Module: beos, leader, mpm_netware, mpm_winnt, mpmt_os2, amount of memory that process can consume by (accidental)
perchild, prefork, threadpool, worker SendBufferSize Directive memory leakage.
Description: TCP buffer size Note: For KeepAlive requests, only the first request is counted
The maximum length of the queue of pending connections. Syntax: SendBufferSize bytes towards this limit. In effect, it changes the behavior to limit the
Generally no tuning is needed or desired, however on some systems Default: SendBufferSize 0 number of connections per child.
it is desirable to increase this when under a TCP SYN flood attack. Context: server config
See the backlog parameter to the listen(2) system call. Status: MPM MaxSpareThreads Directive
This will often be limited to a smaller number by the operating Module: beos, leader, mpm_netware, mpm_winnt, mpmt_os2, Description: Maximum number of idle threads
system. This varies from OS to OS. Also note that many OSes do not perchild, prefork, threadpool, worker Syntax: MaxSpareThreads number
use exactly what is specified as the backlog, but use a number Default: See usage for details
based on (but normally larger than) what is set. The server will set the TCP send buffer size to the number of Context: server config
bytes specified. Very useful to increase past standard OS defaults Status: MPM
on high speed high latency Module: beos, leader, mpm_netware, mpmt_os2, perchild,
If set to the value of 0, the server will use the OS default. threadpool, worker
beos and mpmt_os2 work similar to mpm_netware. The default for memory will be allocated. If both ServerLimit and MaxClients are
Maximum number of idle threads. Different MPMs deal with this beos is MinSpareThreads 1. For mpmt_os2 the default value is 5. set to values higher than the system can handle, Apache may not
directive differently. See also start or the system may become unstable.
For perchild the default is MaxSpareThreads 10. This MPM monitors MaxSpareThreads
the number of idle threads on a per-child basis. If there are too StartServers With the prefork MPM, use this directive only if you need to set
many idle threads in that child, the server will begin to kill threads MaxClients higher than 256 (default). Do not set the value of this
within that child. PidFile DirectiveDescription: File where the server records the directive any higher than what you might want to set MaxClients to.
For worker, leader and threadpool the default is MaxSpareThreads process ID of the daemon
250. These MPMs deal with idle threads on a server-wide basis. If Syntax: PidFile filename With worker, leader and threadpool use this directive only if your
there are too many idle threads in the server then child processes Default: PidFile logs/httpd.pid MaxClients and ThreadsPerChild settings require more than 16
are killed until the number of idle threads is less than this number. Context: server config server processes (default). Do not set the value of this directive any
For mpm_netware the default is MaxSpareThreads 100. Since this Status: MPM higher than the number of server processes required by what you
MPM runs a single-process, the spare thread count is also server- Module: beos, leader, mpm_winnt, mpmt_os2, perchild, prefork, may want for MaxClients and ThreadsPerChild.
wide. threadpool, worker
beos and mpmt_os2 work similar to mpm_netware. The default for With the perchild MPM, use this directive only if you need to set
beos is MaxSpareThreads 50. For mpmt_os2 the default value is 10. NumServers higher than 8 (default).
The PidFile directive sets the file to which the server records the Note
Restrictions process id of the daemon. If the filename is not absolute then it is
The range of the MaxSpareThreads value is restricted. Apache will assumed to be relative to the ServerRoot. There is a hard limit of ServerLimit 20000 compiled into the server.
correct the given value automatically according to the following Example This is intended to avoid nasty effects caused by typos.
rules: See also
perchild requires MaxSpareThreads to be less or equal than PidFile /var/run/apache.pid Stopping and Restarting Apache
ThreadLimit.
mpm_netware wants the value to be greater than It is often useful to be able to send the server a signal, so that it StartServers DirectiveDescription: Number of child server processes
MinSpareThreads. closes and then re-opens its ErrorLog and TransferLog, and re-reads created at startup
For leader, threadpool and worker the value must be greater or its configuration files. This is done by sending a SIGHUP (kill -1) Syntax: StartServers number
equal than the sum of MinSpareThreads and signal to the process id listed in the PidFile. Default: See usage for details
ThreadsPerChild. Context: server config
The PidFile is subject to the same warnings about log file placement Status: MPM
MinSpareThreads DirectiveDescription: Minimum number of and security. Module: leader, mpmt_os2, prefork, threadpool, worker
idle threads available to handle request spikes Note
Syntax: MinSpareThreads number
Default: See usage for details As of Apache 2 it is recommended to use only the apachectl script The StartServers directive sets the number of child server processes
Context: server config for (re-)starting or stopping the server. created on startup. As the number of processes is dynamically
Status: MPM controlled depending on the load, there is usually little reason to
Module: beos, leader, mpm_netware, mpmt_os2, perchild, adjust this parameter.
threadpool, worker
The default value differs from MPM to MPM. For leader, threadpool
ServerLimit DirectiveDescription: Upper limit on configurable and worker the default is StartServers 3. For prefork defaults to 5
Minimum number of idle threads to handle request spikes. Different number of processes and for mpmt_os2 to 2.
MPMs deal with this directive differently. Syntax: ServerLimit number
Default: See usage for details StartThreads DirectiveDescription: Number of threads
perchild uses a default of MinSpareThreads 5 and monitors the Context: server config created on startup
number of idle threads on a per-child basis. If there aren't enough Status: MPM Syntax: StartThreads number
idle threads in that child, the server will begin to create new Module: leader, perchild, prefork, threadpool, worker Default: See usage for details
threads within that child. Thus, if you set NumServers to 10 and a Context: server config
MinSpareThreads value of 5, you'll have at least 50 idle threads on Status: MPM
your system. For the prefork MPM, this directive sets the maximum configured Module: beos, mpm_netware, perchild
value for MaxClients for the lifetime of the Apache process. For the
worker, leader and threadpool use a default of MinSpareThreads 75 worker MPM, this directive in combination with ThreadLimit sets the
and deal with idle threads on a server-wide basis. If there aren't maximum configured value for MaxClients for the lifetime of the Number of threads created on startup. As the number of threads is
enough idle threads in the server then child processes are created Apache process. Any attempts to change this directive during a dynamically controlled depending on the load, there is usually little
until the number of idle threads is greater than number. restart will be ignored, but MaxClients can be modified during a reason to adjust this parameter.
restart.
mpm_netware uses a default of MinSpareThreads 10 and, since it is For perchild the default is StartThreads 5 and this directive tracks
a single-process MPM, tracks this on a server-wide bases. Special care must be taken when using this directive. If ServerLimit the number of threads per process at startup.
is set to a value much higher than necessary, extra, unused shared
For mpm_netware the default is StartThreads 50 and, since there is There is a hard limit of ThreadLimit 20000 (or ThreadLimit 15000 initially as root. If you start the server as a non-root user, it will fail
only a single process, this is the total number of threads created at with mpm_winnt) compiled into the server. This is intended to to change to the lesser privileged user, and will instead continue to
startup to serve requests. avoid nasty effects caused by typos. run as that original user. If you do start the server as root, then it is
normal for the parent process to remain running as root. Unix-userid
For beos the default is StartThreads 10. It also reflects the total ThreadsPerChild DirectiveDescription: Number of threads is one of:
number of threads created at startup to serve requests. created by each child process A username
Syntax: ThreadsPerChild number Refers to the given user by name.
ThreadLimit DirectiveDescription: Sets the upper limit on the Default: See usage for details # followed by a user number.
configurable number of threads per child process Context: server config Refers to a user by its number.
Syntax: ThreadLimit number Status: MPM
Default: See usage for details Module: leader, mpm_winnt, threadpool, worker The user should have no privileges that result in it being able to
Context: server config access files that are not intended to be visible to the outside world,
Status: MPM and similarly, the user should not be able to execute code that is
Module: leader, mpm_winnt, perchild, threadpool, worker This directive sets the number of threads created by each child not meant for HTTP requests. It is recommended that you set up a
Compatibility: Available for mpm_winnt in Apache 2.0.41 process. The child creates these threads at startup and never new user and group specifically for running the server. Some admins
and later creates more. If using an MPM like mpm_winnt, where there is only use user nobody, but this is not always desirable, since the nobody
one child process, this number should be high enough to handle the user can have other uses on the system.
entire load of the server. If using an MPM like worker, where there Security
This directive sets the maximum configured value for are multiple child processes, the total number of threads should be
ThreadsPerChild for the lifetime of the Apache process. Any high enough to handle the common load on the server. Don't set User (or Group) to root unless you know exactly what you
attempts to change this directive during a restart will be ignored, are doing, and what the dangers are.
but ThreadsPerChild can be modified during a restart up to the The default value for ThreadsPerChild is 64 when used with
value of this directive. mpm_winnt and 25 when used with the others. With the perchild MPM, which is intended to server virtual hosts run
under different user IDs, the User directive defines the user ID for
Special care must be taken when using this directive. If ThreadLimit User DirectiveDescription: The userid under which the server the main server and the fallback for <VirtualHost> sections without
is set to a value much higher than ThreadsPerChild, extra unused will answer requests an AssignUserID directive.
shared memory will be allocated. If both ThreadLimit and Syntax: User unix-userid
ThreadsPerChild are set to values higher than the system can Default: User #-1 Special note: Use of this directive in <VirtualHost> is no longer
handle, Apache may not start or the system may become unstable. Context: server config supported. To configure your server for suexec use
Do not set the value of this directive any higher than your greatest Status: MPM SuexecUserGroup.
predicted setting of ThreadsPerChild for the current run of Apache. Module: leader, perchild, prefork, threadpool, worker Note
Compatibility: Only valid in global server config since
The default value for ThreadLimit is 1920 when used with Apache 2.0 Although the User directive is present in the beos and mpmt_os2
mpm_winnt and 64 when used with the others. MPMs, it is actually a no-op there and only exists for compatibility
Note reasons.
The User directive sets the user ID as which the server will answer
requests. In order to use this directive, the server must be run

Вам также может понравиться