Apache Core Features 9
Syntax:
Require entity-name [entity-name] ...
Context:
directory, .htaccess
Override:
AuthConfig
Status:
core
This directive selects which authenticated users can access a resource. The allowed
syntaxes are:
- Require user userid [userid] ...
Only the named users can access the resource.
- Require group group-name [group-name] ...
Only users in the named groups can access the resource.
- Require valid-user
All valid users can access the resource.
- file-owner
Only the user, whose name matches the system's name for the file owner, can access the
resource.
[Available after Apache 1.3.20]
- file-group
Only the members of the group, whose name matches the system's name of the file owner
group, can access the resource.
[Available after Apache 1.3.20]
Require must be accompanied by AuthName and AuthType
directives, and directives such as
AuthUserFile and
AuthGroupFile (to
define users and groups) in order to work correctly. Example:
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /web/users
AuthGroupFile /web/groups
Require group admin
Access controls which are applied in this way are effective for all methods. This
is what is normally desired. If you wish to apply access controls only to specific
methods, while leaving other methods unprotected, then place the Require
statement into a <Limit> section
See also Satisfy and
mod_access.
Syntax:
ResourceConfig file-path|directory-path|wildcard-path
Default:
ResourceConfig conf/srm.conf
Context:
server config, virtual host
Status:
core
Compatibility:
The ability to specify a directory, rather than a file name, is only available in Apache
1.3.13 and later.
The server will read this file for more directives after reading the httpd.conf file. File-path
is relative to the ServerRoot. This feature can be disabled using:
ResourceConfig /dev/null
Or, on Win32 servers,
ResourceConfig nul
Historically, this file contained most directives except for server configuration
directives and <Directory> sections; in fact it can now contain
any server directive allowed in the server config context. However, since Apache
version 1.3.4, the default srm.conf file which ships with Apache contains only
comments, and all directives are placed in the main server configuration file, httpd.conf.
If ResourceConfig points to a directory, rather than a file, Apache will read
all files in that directory, and any subdirectory, and parse those as configuration files.
Alternatively you can use a wildcard to limit the scope; i.e to only *.conf files.
Note that by default any file in the specified directory will be loaded as a
configuration file.
So make sure that you don't have stray files in this directory by mistake, such as
temporary files created by your editor, for example.
See also AccessConfig.
Syntax:
RLimitCPU number|max [number|max]
Default:
Unset; uses operating system defaults
Context:
server config, virtual host
Status:
core
Compatibility:
RLimitCPU is only available in Apache 1.2 and later
Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all processes
and the second parameter sets the maximum resource limit. Either parameter can be a number, or
max to indicate to the server that the limit should be set to the maximum allowed
by the operating system configuration. Raising the maximum resource limit requires that the
server is running as root, or in the initial startup phase.
This applies to processes forked off from Apache children servicing requests, not the
Apache children themselves. This includes CGI scripts and SSI exec commands, but not any
processes forked off from the Apache parent such as piped logs.
CPU resource limits are expressed in seconds per process.
See also RLimitMEM or RLimitNPROC.
Syntax:
RLimitMEM number|max [number|max]
Default:
Unset; uses operating system defaults
Context:
server config, virtual host
Status:
core
Compatibility:
RLimitMEM is only available in Apache 1.2 and later
Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all processes
and the second parameter sets the maximum resource limit. Either parameter can be a number, or
max to indicate to the server that the limit should be set to the maximum allowed
by the operating system configuration. Raising the maximum resource limit requires that the
server is running as root, or in the initial startup phase.
This applies to processes forked off from Apache children servicing requests, not the
Apache children themselves. This includes CGI scripts and SSI exec commands, but not any
processes forked off from the Apache parent such as piped logs.
Memory resource limits are expressed in bytes per process.
See also RLimitCPU or RLimitNPROC.
Syntax:
RLimitNPROC number|max [number|max]
Default:
Unset; uses operating system defaults
Context:
server config, virtual host
Status:
core
Compatibility:
RLimitNPROC is only available in Apache 1.2 and later
Takes 1 or 2 parameters. The first parameter sets the soft resource limit for all processes
and the second parameter sets the maximum resource limit. Either parameter can be a number, or
max to indicate to the server that the limit should be set to the maximum allowed
by the operating system configuration. Raising the maximum resource limit requires that the
server is running as root, or in the initial startup phase.
This applies to processes forked off from Apache children servicing requests, not the
Apache children themselves. This includes CGI scripts and SSI exec commands, but not any
processes forked off from the Apache parent such as piped logs.
Process limits control the number of processes per user.
Note: If CGI processes are not running under userids other than the web
server userid, this directive will limit the number of processes that the server itself can
create. Evidence of this situation will be indicated by cannot fork
messages in the error_log.
See also RLimitMEM or RLimitCPU.
|