Apache Reference Manual (11)
发表于:2007-07-01来源:作者:点击数:
标签:
ServerRoot directive Syntax: ServerRoot directory-filename Default: ServerRoot /usr/local/apache Context: server config Status: core The ServerRoot directive sets the directory in which the server lives. Typically it will contain the subdir
ServerRoot directive
Syntax: ServerRoot directory-filename
Default: ServerRoot /usr/local/apache
Context: server config
Status: core
The ServerRoot directive sets the directory in which the server lives. Typically it will contain the subdirectories conf/ and logs/. Relative paths for other configuration files are taken as relative to this directory.
See also the -d option to httpd.
See also the security tips for information on how to properly set permissions on the ServerRoot.
--------------------------------------------------------------------------------
ServerSignature directive
Syntax: ServerSignature Off | On | EMail
Default: ServerSignature Off
Context: server config, virtual host, directory, .hta
clearcase/" target="_blank" >ccess
Status: core
Compatibility: ServerSignature is only available in Apache 1.3 and later.
The ServerSignature directive allows the configuration of a trailing footer line under server-generated documents (error messages, mod_proxy ftp directory listings, mod_info output, ...). The reason why you would want to enable such a footer line is that in a chain of proxies, the user often has no possibility to tell which of the chained servers actually produced a returned error message.
The Off setting, which is the default, suppresses the error line (and is therefore compatible with the behavior of Apache-1.2 and below). The On setting simply adds a line with the server version number and ServerName of the serving virtual host, and the EMail setting additionally creates a "mailto:" reference to the ServerAdmin of the referenced document.
--------------------------------------------------------------------------------
ServerTokens directive
Syntax: ServerTokens Minimal|OS|Full
Default: ServerTokens Full
Context: server config
Status: core
Compatibility: ServerTokens is only available in Apache 1.3 and later
This directive controls whether Server response header field which is sent back to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules.
ServerTokens Min[imal]
Server sends (e.g.): Server: Apache/1.3.0
ServerTokens OS
Server sends (e.g.): Server: Apache/1.3.0 (Unix)
ServerTokens Full (or not specified)
Server sends (e.g.): Server: Apache/1.3.0 (Unix)
PHP/3.0 MyMod/1.2
This setting applies to the entire server, and cannot be enabled or disabled on a virtualhost-by-virtualhost basis.
--------------------------------------------------------------------------------
ServerType directive
Syntax: ServerType type
Default: ServerType standalone
Context: server config
Status: core
The ServerType directive sets how the server is executed by the system. Type is one of
.netd
The server will be run from the system process inetd; the command to start the server is added to /etc/inetd.conf
standalone
The server will run as a daemon process; the command to start the server is added to the system startup scripts. (/etc/rc.local or /etc/rc3.d/....)
Inetd is the lesser used of the two options. For each http connection received, a new copy of the server is started from scratch; after the connection is complete, this program exits. There is a high price to pay per connection, but for security reasons, some admins prefer this option. Inetd mode is no longer recommended and does not always work properly. Avoid it if at all possible.
Standalone is the most common setting for ServerType since it is far more efficient. The server is started once, and services all subsequent connections. If you intend running Apache to serve a busy site, standalone will probably be your only option.
--------------------------------------------------------------------------------
StartServers directive
Syntax: StartServers number
Default: StartServers 5
Context: server config
Status: core
The StartServers directive sets the number of child server processes created on startup. As the number of processes is dynamically controlled depending on the load, there is usually little reason to adjust this parameter.
When running under Microsoft Windows, this directive has no effect. There is always one child which handles all requests. Within the child requests are handled by separate threads. The ThreadsPerChild directive controls the maximum number of child threads handling requests, which will have a similar effect to the setting of StartServers on Unix.
See also MinSpareServers and MaxSpareServers.
--------------------------------------------------------------------------------
ThreadsPerChild
Syntax: ThreadsPerChild number
Default: ThreadsPerChild 50
Context: server config
Status: core (Windows, NetWare)
Compatibility: Available only with Apache 1.3 and later with Windows
This directive tells the server how many threads it should use. This is the maximum number of connections the server can handle at once; be sure and set this number high enough for your site if you get a lot of hits.
This directive has no effect on Unix systems. Unix users should look at StartServers and MaxRequestsPerChild.
--------------------------------------------------------------------------------
ThreadStackSize
Syntax: ThreadStackSize number
Default: ThreadStackSize 65536
Context: server config
Status: core (NetWare)
Compatibility: Available only with Apache 1.3 and later with NetWare
This directive tells the server what stack size to use for each of the running threads. If you ever get a stack overflow you will need to bump this number to a higher setting.
This directive has no effect on other systems.
--------------------------------------------------------------------------------
TimeOut directive
Syntax: TimeOut number
Default: TimeOut 300
Context: server config
Status: core
The TimeOut directive currently defines the amount of time Apache will wait for three things:
The total amount of time it takes to receive a GET request.
The amount of time between receipt of TCP packets on a POST or PUT request.
The amount of time between ACKs on transmissions of TCP packets in responses.
We plan on making these separately configurable at some point down the road. The timer used to default to 1200 before 1.2, but has been lowered to 300 which is still far more than necessary in most situations. It is not set any lower by default because there may still be odd places in the code where the timer is not reset when a packet is sent.
--------------------------------------------------------------------------------
原文转自:http://www.ltesting.net