日期:2011-02-06  浏览次数:20541 次

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, .htaccess
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

inetd
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