Apache Core Features 10
Syntax:
Satisfy any|all
Default:
Satisfy all
Context:
directory, .htaccess
Status:
core
Compatibility:
Satisfy is only available in Apache 1.2 and later
Access policy if both Allow and Require used. The parameter can
be either 'all' or 'any'. This directive is only useful if access to a
particular area is being restricted by both username/password and client host
address. In this case the default behavior ("all") is to require that the client
passes the address access restriction and enters a valid username and password. With
the "any" option the client will be granted access if they either pass the host
restriction or enter a valid username and password. This can be used to password restrict an
area, but to let clients from particular addresses in without prompting for a password.
See also Require and
Allow.
Syntax:
ScoreBoardFile file-path
Default:
ScoreBoardFile logs/apache_status
Context:
server config
Status:
core
The ScoreBoardFile directive is required on some architectures to place a file that the
server will use to communicate between its children and the parent. The easiest way to find
out if your architecture requires a scoreboard file is to run Apache and see if it creates the
file named by the directive. If your architecture requires it then you must ensure that this
file is not used at the same time by more than one invocation of Apache.
If you have to use a ScoreBoardFile then you may see improved speed by placing it on a RAM
disk. But be careful that you heed the same warnings about log file placement and
security.
Apache 1.2 and above:
Linux 1.x users might be able to add -DHAVE_SHMGET -DUSE_SHMGET_SCOREBOARD to
the EXTRA_CFLAGS in your Configuration. This might work with some
1.x installations, but won't work with all of them. (Prior to 1.3b4, HAVE_SHMGET
would have sufficed.)
SVR4 users should consider adding -DHAVE_SHMGET -DUSE_SHMGET_SCOREBOARD to the
EXTRA_CFLAGS in your Configuration. This is believed to work, but we
were unable to test it in time for 1.2 release. (Prior to 1.3b4, HAVE_SHMGET
would have sufficed.)
See Also:
Stopping
and Restarting Apache
Syntax:
ScriptInterpreterSource registry|script
Default:
ScriptInterpreterSource script
Context:
directory, .htaccess
Status:
core (Windows only)
This directive is used to control how Apache 1.3.5 and later finds the interpreter used to
run CGI scripts. The default technique is to use the interpreter pointed to by the #! line in
the script. Setting ScriptInterpreterSource registry will cause the Windows Registry to be
searched using the script file extension (e.g., .pl) as a search key.
Syntax:
SendBufferSize bytes
Context:
server config
Status:
core
The server will set the TCP buffer size to the number of bytes specified. Very useful to
increase past standard OS defaults on high speed high latency (i.e., 100ms or so,
such as transcontinental fast pipes)
Syntax:
ServerAdmin email-address
Context:
server config, virtual host
Status:
core
The ServerAdmin sets the e-mail address that the server includes in any error messages it
returns to the client.
It may be worth setting up a dedicated address for this, e.g.
ServerAdmin www-admin@foo.bar.com
as users do not always mention that they are talking about the server!
Syntax:
ServerAlias hostname [hostname] ...
Context:
virtual host
Status:
core
Compatibility:
ServerAlias is only available in Apache 1.1 and later.
The ServerAlias directive sets the alternate names for a host, for use with
name-based virtual hosts.
Example:
<VirtualHost *>
ServerName server.domain.com
ServerAlias server server2.domain.com server2
...
</VirtualHost>
See also:
Apache Virtual
Host documentation
Syntax:
ServerName fully-qualified-domain-name
Context:
server config, virtual host
Status:
core
The ServerName directive sets the hostname of the server; this is used when creating
redirection URLs. If it is not specified, then the server attempts to deduce it from its own
IP address; however this may not work reliably, or may not return the preferred hostname. For
example:
ServerName www.example.com
would be used if the canonical (main) name of the actual machine were simple.example.com.
If you are using
name-based
virtual hosts, the ServerName inside a <VirtualHost>
section specifies what hostname must appear in the request's Host: header to
match this virtual host.
See Also:
DNS Issues
Apache virtual host documentation
UseCanonicalName
NameVirtualHost
ServerAlias
Syntax:
ServerPath directory-path
Context:
virtual host
Status:
core
Compatibility:
ServerPath is only available in Apache 1.1 and later.
The ServerPath directive sets the legacy URL pathname for a host, for use with
name-based virtual hosts.
See also:
Apache Virtual
Host documentation
Syntax:
ServerRoot directory-path
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.
Syntax:
ServerSignature On|Off|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.
Syntax:
ServerTokens Minimal|ProductOnly|OS|Full
Default:
ServerTokens Full
Context:
server config
Status:
core
Compatibility:
ServerTokens is only available in Apache 1.3 and later; the ProductOnly keyword
is only available in versions later than 1.3.12
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 Prod[uctOnly]
- Server sends (e.g.): Server: Apache
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.
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.
Syntax:
ShmemUIDisUser on|off
Default:
ShmemUIDisUser off
Context:
server config
Status:
core
Compatibility:
ShmemUIDisUser directive is only available in Apache 1.3.27 and later.
The ShmemUIDisUser directive controls whether Apache will change the uid and gid
ownership of System V shared memory based scoreboards to the server settings of User and Group. Releases of Apache up to 1.3.26 would do
this by default. Since the child processes are already attached to the shared memory segment,
this is not required for normal usage of Apache and so to prevent possible abuse, Apache will
no longer do that. The old behavior may be required for special cases, however, which can be
implemented by setting this directive to on.
This directive has no effect on non-System V based scoreboards, such as mmap.
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.
|