[Top] [Prev] [Next] [Last]
|
|
Chapter 7Configuration Reference
- general configuration
- performance tuning
- proxy service and caching
- logging
- the directory tree
- file handling and preprocessing
- content delivery
- client authentication and access control
- server authentication
- encryption
- Sioux-compatible directives
For each directive, this chapter gives several types of information:
- syntax
- context
- module
This is the module that facilitates the directive's functionality.
- default value (where applicable)
- AllowOverride value (where applicable)
- brief description
New Directives in Stronghold 2.4.1
The following directives are new in version 2.4.1 of Stronghold Web Server:
- ProxyVia and AllowCONNECT on page 7-35
- ExtendedStatus on page 7-45
- LimitRequestBody, LimitRequestFields, LimitRequestFieldSize, and LimitRequestLine on page 7-78
General Configuration
- server setup directives
- virtual hosts
- SSL setup
- .htaccess configuration
- environment variables
- FastCGI
Server Setup Directives
StrongholdLicenseFile
- Syntax: StrongholdLicenseFile licensefile|NONCOMMERCIAL
- Context: server
- Module: core
*****BEGIN LICENSE BLOCK*****
TEIAAQCKAAAAAGar2a7Pc0iD2oyGDN9a5mrYkZ0NrG7Zcy7UFbFoP4xLzvcVAN4K
0Mrww4z0A2o+gfVADbDz9IdePDKOA21C2E8SiPu1qwVI1pwvbA6xuVRWDo05BT/I
rNGExtSx+LMh3N1q2icj4eD53kNQVoLvaoQ5CcYvWGexrKiSDQvE3agLU2VyaWFs
OiAzMTQxNTkyNjUzNTg5NzkzMjMKQ29tcGFueTogQzJOZXQgRXVybSchmunkZApF
eHBpcmVzOiBOZXZlcgpQcm9kdWN0OiBTSDIKVHlwZfogRXZhbHVhdGlvbgpJREVB
OiBZZXMKRmFrZTogCkJyb2tlbiBMaW5lCkJyb2tlbjogMQ==
*****END LICENSE BLOCK*****
DocumentRoot
- Syntax: DocumentRoot directory
- Context: host
- Module: core
- Default: DocumentRoot /usr/local/etc/httpd/htdocs
DocumentRoot /usr/web
is specified, then an access to http://www.my.host.com/index.html refers to /usr/web/index.html.
ErrorDocument
- Syntax: ErrorDocument errorcode filename|"errormessage"|URL
- Context: object
- Module: core
- AllowOverride: FileInfo
- the name of a file containing an error message or CGI program
- a quoted error message
- the URL of an error message file or CGI program
URLs begin with a slash (/) for local URLs, or a full URL which the client can resolve. Examples:
ErrorDocument 500 /cgi-bin/tester
ErrorDocument 404 /cgi-bin/bad_urls.pl
ErrorDocument 403 "Sorry can't allow you access today"
For a complete list of error codes and their meanings, see "Server Errors" on page B-6.
Listen
- Syntax: Listen [IP:]port
- Context: server
- Module: core
Port
- Syntax: Port n
- Context: host
- Module: core
- Default: Port 80
User
- Syntax: User userid
- Context: server
- Module: core
- Default: nobody
- username: Refers to the given user by name.
- # user-number: Refers to a user by his or her number.
NOTE: Do not set User (or Group) to root unless you know exactly what you are doing and what the dangers are.
Group
- Syntax: Group UNIX-group
- Context: server
- Module: core
- Default: Group nobody
- A group name: Refers to the given group by name.
- # groupnumber: Refers to a group by its number.
We recommend that you set up a new group specifically for running the server.
NOTE: If you start the server as a non-root user, it will fail to change to the specified group and will instead continue to run as the group of the original user.
Options
- Syntax: Options option1 [option2 . . . ]
- Context: object
- Module: core
- AllowOverride: Options
<VirtualHost www.manatee.org:80>
Options -ExecCGI +MultiViews
. . .
</VirtualHost>
<Directory /web/docs>
Options Indexes FollowSymLinks
</Directory>
<Directory /web/docs/spec>
Options Includes
</Directory>
In this example, only "Includes" is set for the /web/docs/spec directory.
ServerAdmin
- Syntax: ServerAdmin email-address
- Context: host
- Module: core
It may be worth setting up a dedicated address for this, for example,
ServerAdmin www-admin@foo.bar.com
as users do not always mention that they are talking about the server.
ServerRoot
- Syntax: ServerRoot path
- Context: server
- Module: core
- Default: ServerRoot /usr/local/etc/httpd
Include
- Syntax: Include filename
- Context: object
- Module: core
ServerSignature
- Syntax: ServerSignature off|on|email
- Context: object
- Module: core
- Default: ServerSignature Off
- The default "off" setting suppresses the error line.
- The "on" setting adds a line with the server version number and ServerName of the serving virtual host.
- The "email" setting adds a line with the server version number and ServerName of the serving virtual host, and additionally creates a "mailto:" reference to the ServerAdmin of the referenced document.
Virtual Hosts
Virtual host directives control basic, host-specific attributes of virtual hosts. For more information about virtual host configuration, see "Configuring Virtual Hosts" on page 6-9.
ServerName
- Syntax: ServerName hostname
- Context: host
- Module: core
ServerName www.foo.com
would be used if the canonical name of the actual machine were monster.foo.com.
NOTE: The main server and all virtual hosts must each have the ServerName directive.
NameVirtualHost
- Syntax: NameVirtualHost IP[:port]
- Context: server
- Module: core
Although IP can be a hostname, it is recommended that you always use an IP address, as follows:
NameVirtualHost 111.22.33.44
NameVirtualHost 111.22.33.44:8080
NOTE: The main server and any "_default_" servers will never be served for a request to a NameVirtualHost IP Address (unless for some reason you specify NameVirtualHost but don't define any virtual hosts for that address).
For more information about name-based virtual host configuration, see "Name-Based Virtual Hosts" on page 6-13.
ServerAlias
- Syntax: ServerAlias host1 [host2 . . . ]
- Context: host
- Module: core
UseCanonicalName
- Syntax: UseCanonicalName on|off
- Context: object
- Module: core
- AllowOverride: AuthConfig
In many situations, the server must construct self-referential URLs. A self-referential URL refers back to the server itself. When UseCanonicalName is set to "on," Stronghold uses the ServerName and Port directives to construct a canonical name for the server. This name is used in all self-referential URLs, and for the values of SERVER_NAME and SERVER_PORT in CGIs.
When UseCanonicalName is set to "off," Stronghold forms self-referential URLs using the hostname and port supplied by the client, if any. Otherwise, it uses the canonical name. These values are the same that are used to implement name-based virtual hosts, and are available with the same clients. The CGI variables SERVER_NAME and SERVER_PORT are constructed from the client-supplied values as well.
NOTE: Warning: If CGIs make assumptions about the values of SERVER_NAME, they may be broken by this feature. The client is free to give any value as a hostname. This should not be a problem if the CGI is only using SERVER_NAME to construct self-referential URLs.
ServerPath
- Syntax: ServerPath path
- Context: host
- Module: core
SSL Setup
These directives are necessary to enable SSL functionality for any host on the server. When SSL is enabled, server authentication is required but client authentication is not. See "Server Authentication" on page 7-105 for the required server authentication directives.
SSLFlag
- Syntax: SSLFlag on|off
- Context: host
- Module: mod_ssl
SSLProtocol
- Syntax: SSLProtocol protocol1 [protocol2. . . ]
- Context: host
- Module: mod_ssl
- TLSv1
- SSLv2
- SSLv3
- all
SSLProtocol all -sslv2
enables TLS version 1 and SSL version 3, but not SSL version 2.
NOTE: If SSLProtocol is omitted, all protocols are enabled by default.
SSLRoot
- Syntax: SSLRoot path
- Context: host
- Module: mod_ssl
- Default: SSLRoot /usr/local/ssl
NOTE: All other paths and filenames relating to SSL must be either absolute or relative to SSLRoot.
SSLSessionLockFile
- Syntax: SSLSessionLockFile filename
- Context: server
- Module: mod_ssl
NOTE: The lock file must be stored locally. If your logs/ directory is on an NFS-mounted file system, set SSLSessionLockFile to point to a local file.
.htaccess Configuration
Per-directory configuration files are enabled only when
- the AccessFileName directive is present and
- AllowOverride is set to a value other than "none."
AccessFileName
- Syntax: AccessFileName filename1 [filename2. . . ]
- Context: host
- Module: core
- Default: AccessFileName .htaccess
<Directory />
AllowOverride None
</Directory>
AllowOverride
- Syntax: AllowOverride override override . . .
- Context: <Directory> and <Location> only
- Module: core
- Default: AllowOverride All
Environment Variables
PassEnv
- Syntax: PassEnv variable1 [variable2 . . . ]
- Context: object
- Module: mod_env
SetEnv
- Syntax: SetEnv variable value
- Context: object
- Module: mod_env
With SetEnv, you can explicitly set a CGI environment variable. For example:
SetEnv LIBDIR /www/lib
SetEnvIf
- Syntax: SetEnvIf attribute regex envar[=value] [. . . ]
- Context: server
- Module: mod_setenvif
Some of the more commonly used request header field names include Host, User-Agent, and Referer.
SetEnvIf Request_URI "\.(gif)|(jpg)|(xbm)$" object_is_image
SetEnvIf Referer www\.mydomain\.com intra_site_referral
SetEnvIfNoCase
- Syntax: SetEnvIfNoCase attribute regex envar[=value] [. . . ]
- Context: server
- Module: mod_setenvif
SetEnvIfNoCase is semantically identical to the SetEnvIf directive, except that the regular expression matching is case-insensitive. For example:
SetEnvIfNoCase Host Apache\.Org site=apache
UnSetEnv
- Syntax: UnSetEnv variable
- Context: object
- Module: mod_env
BrowserMatch
- Syntax: BrowserMatch regex var1 [var2 . . . ]
- Context: server
- Module: mod_browser
The server configuration can include one or more BrowserMatch directives, which define environment variables based on the User-Agent HTTP header in client requests. Stronghold reads multiple BrowserMatch entries in the order in which they appear in httpd.conf. Regex is a POSIX.2 regular expression that denotes a User-Agent string match. If a User-Agent string matches more than one BrowserMatch argument, Stronghold merges the arguments. Regex is followed by one or more variable strings that can take the following forms:
BrowserMatch Mozilla/2 nokeepalive
BrowserMatchNoCase
- Syntax: BrowserMatchNoCase regex var1 [var2 . . . ]
- Context: server
- Module: mod_browser
Performance Tuning
Basic Performance Tuning
These directives control the basic functions that affect Stronghold's performance.
StrongholdAccelerator
- Syntax: StrongholdAccelerator none|nFast
- Context: server
- Module: mod_ssl
For more information about nFast, see http://www.ncipher.com.
ServerType
- Syntax: ServerType type
- Context: server
- Module: core
- Default: ServerType standalone
- "inetd": The server will be run from the system process inetd; the command to start the server is added to /etc/inetd.conf. This option is not recommended, primarily because it does not function with SSL.
- "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/. . . .)
CoreDumpDirectory
- Syntax: CoreDumpDirectory directory
- Context: server
- Module: core
- Default: ServerRoot
SendBufferSize
- Syntax: SendBufferSize n
- Context: server
- Module: core
TimeOut
- Syntax: TimeOut n
- Context: server
- Module: core
- Default: TimeOut 1200
KeepAlive
KeepAlive
- Syntax: KeepAlive on|off
- Context: server
- Module: core
- Default: KeepAlive off
MaxKeepAliveRequests
- Syntax: MaxKeepAliveRequests n
- Context: server
- Module: core
- Default: MaxKeepAliveRequests 100
KeepAliveTimeout
- Syntax: KeepAliveTimeout seconds
- Context: server
- Module: core
- Default: KeepAliveTimeout 15
The number of seconds Stronghold will wait for a subsequent request before closing the connection.
Process Control
ListenBacklog
- Syntax: ListenBacklog n
- Context: server
- Module: core
- Default: ListenBacklog 511
LockFile
- Syntax: LockFile filename
- Context: server
- Module: core
- Default: LockFile logs/accept.lock
NOTE: Avoid putting this file in a world-writable directory such as /var/tmp because someone could create a denial-of-service attack by creating a lockfile with the same name as the one the server tries to create. The server cannot start under such an attack.
MaxClients
- Syntax: MaxClients n
- Context: server
- Module: core
- Default: MaxClients 150
NOTE: MaxClients should never be less than 2.
Stronghold Web Server has a hard limit of 256 simultaneous requests. This is set in the httpd.h file. You can edit this file and recompile the server with a different hard limit, if necessary. See "Recompiling Stronghold" on page 8-9 for instructions on recompiling Stronghold.
MaxRequestsPerChild
- Syntax: MaxRequestsPerChild n
- Context: server
- Module: core
- Default: MaxRequestsPerChild 0
Setting MaxRequestsPerChild to a non-zero limit has two beneficial effects:
- It limits the amount of memory that a process can consume by (accidental) memory leakage.
- By giving processes finite lifetimes, it helps reduce the number of processes when the server load falls.
MaxSpareServers
- Syntax: MaxSpareServers n
- Context: server
- Module: core
- Default: MaxSpareServers 10
MinSpareServers
- Syntax: MinSpareServers n
- Context: server
- Module: core
- Default: MinSpareServers 5
StartServers
- Syntax: StartServers n
- Context: server
- Module: core
- Default: StartServers 5
Resources
RLimitCPU
- Syntax: RLimitCPU n|max [n|max]
- Context: host
- Module: core
- n is seconds per process
- "max" is the maximum resource limits allowed by the operating system
RLimitMEM
- Syntax: RLimitMEM n|max [n|max]
- Context: host
- Module: core
- n is bytes per process
- "max" is the maximum resource limits allowed by the operating system
RLimitNPROC
- Syntax: RLimitNPROC n|max [n|max]
- Module: core
- n is processes per user
- "max" is the maximum resource limits allowed by the operating system
NOTE: If your CGI processes run under the same user ID as Stronghold, this directive sets the maximum number of processes Stronghold itself is allowed to create. If the limit is too low, the error log will manifest the problem with "Cannot fork" messages.
Dynamic Shared Objects
The dynamic shared object module, mod_so, allows the server to load shared object code, including shared object modules, at startup. These directives designate shared object code to be loaded at startup. For more information about using mod_so, see "Dynamic Shared Object Support" on page 8-6.
LoadModule
- Syntax: LoadModule module filename
- Context: server
- Module: mod_so
LoadModule status_module src/modules/mod_status.so
loads the status module from the src/modules subdirectory of ServerRoot.
LoadFile
- Syntax: LoadFile filename1 [filename2. . . ]
- Context: server
- Module: mod_so
Dynamic Module Linking
ClearModuleList
- Syntax: ClearModuleList
- Context: server
- Module: core
AddModule
- Syntax: AddModule module1 [module2 . . . ]
- Context: server
- Module: core
AddModule mod_cgi.c mod_ssl.c mod_dir.c mod_userdir.c mod_alias.c
Whenever you add or remove a module from the AddModule list, you must restart Stronghold to implement your changes. For instructions on restarting the server, see "Restarting Stronghold" on page 1-3.
Proxy Service and Caching
Stronghold can act as a proxy server using mod_proxy. The proxy module is described in more detail in Chapter 4.
ProxyRequests
- Syntax: ProxyRequests On|Off
- Context: host
- Module: mod_proxy
ProxyRemote
- Syntax: ProxyRemote match http://hostname:port
- Context: host
- Module: mod_proxy
This directive defines remote proxies to the Stronghold proxy server. Match is one of the following:
- the name of a URL scheme that the remote server supports
- a partial URL for which the remote server should be used
- "*" to indicate the server should be contacted for all requests.
Remote-server is a partial URL for the remote server.
ProxyRemote ftp http://ftpproxy.mydomain.com:8080
ProxyRemote http://goodguys.com/ http://mirrorguys.com:8000
ProxyRemote * http://cleversite.com
ProxyPass
- Syntax: ProxyPass path URL
- Context: host
- Module: mod_proxy
ProxyPass /mirror/foo http://foo.com
NOTE: If URL specifies HTTPS and no port number is given, ProxyPass assumes port 443.
ProxyPassReverse
- Syntax: ProxyPassReverse path URL
- Context: host
- Module: mod_proxy
This directive causes Stronghold to adjust the URL in the Location header in HTTP redirect responses. When Stronghold is used as a reverse proxy, this is essential to prevent servers behind the proxy from bypassing it with HTTP redirects.
- Path is the name of a local virtual path.
- URL is a partial URL for the remote server.
ProxyPass /mirror/foo http://foo.com
ProxyPassReverse /mirror/foo http://foo.com
ProxyBlock
- Syntax: ProxyBlock word1|host1|domain1 [word2|host2|domain2] . . .
- Context: host
- Module: mod_proxy
ProxyBlock garage.com host.co.uk rocky.wotsamattau.edu
Note that "wotsamattau" would also be sufficient to match "wotsamattau.edu." Note also that
ProxyBlock *
NoProxy
- Syntax: NoProxy domain|subnet|IP|hostname [domain|subnet|IP|hostname. . . ]
- Context: host
- Module: mod_proxy
ProxyRemote * http://firewall.mycompany.com:81
NoProxy .mycompany.com 192.168.112.0/21
ProxyDomain
- Syntax: ProxyDomain domain
- Context: host
- Module: mod_proxy
ProxyRemote * http://firewall.mycompany.com:81
NoProxy .mycompany.com 192.168.112.0/21
ProxyDomain .mycompany.com
In this example, a request for the host www is redirected to www.mycompany.com.
ProxyReceiveBufferSize
- Syntax: ProxyReceiveBufferSize n
- Context: host
- Module: mod_proxy
ProxyReceiveBufferSize 2048
ProxyVia
- Syntax: ProxyVia on|off|full|block
- Context: host
- Module: mod_proxy
HTTP 1.1 requires that proxy servers use the Via HTTP header to record the protocols and proxy hosts used between the client and the server. The ProxyVia directive controls how Stronghold treats Via headers when performing proxy transactions. Its valid values are as follows:
AllowCONNECT
- Syntax: AllowCONNECT port1 [port2. . . ]
- Context: host
- Module: mod_proxy
CONNECT is a generic protocol used to encapsulate SSL/TLS transactions during normal proxy service (enabled with ProxyRequests). Normally, Stronghold allows transactions using the CONNECT protocol only on ports 443 and 563. AllowCONNECT sets one or more other ports on which CONNECT is allowed.
CacheRoot
- Syntax: CacheRoot directory
- Context: host
- Module: mod_proxy
NOTE: If you include this directive, you must also include the others listed in this section, with the exception of the optional ProxyRequests directive.
CacheDirLength
- Syntax: CacheDirLength n
- Context: host
- Module: mod_proxy
CacheDirLevels
- Syntax: CacheDirLevels n
- Context: host
- Module: mod_proxy
CacheSize
- Syntax: CacheSize megabytes
- Context: host
- Module: mod_proxy
This directive sets the size of the disk cache in megabytes.
CacheGcInterval
- Syntax: CacheGcInterval hours
- Context: host
- Module: mod_proxy
CacheMaxExpire
- Syntax: CacheMaxExpire hours
- Context: host
- Module: mod_proxy
CacheLastModifiedFactor
- Syntax: CacheLastModifiedFactor multiplier
- Context: host
- Module: mod_proxy
When it reaches a garbage collection interval, Stronghold compares two numbers:
- the value for CacheMaxExpire
- the time since each file was last modified multiplied by the CacheLastModifiedFactor
CacheDefaultExpire
- Syntax: CacheDefaultExpire hours
- Context: host
- Module: mod_proxy
CacheForceCompletion
- Syntax: CacheForceCompletion n
- Context: host
- Module: mod_proxy
NoCache
- Syntax: NoCache hostname1 [hostname2 . . . ]
- Context: host
- Module: mod_proxy
Logging
For more detailed information about logs, see "Using Logs and Reports" on page 1-5.
General Logs
These logs record data about non-SSL transactions.
TransferLog
- Syntax: TransferLog filename
- Context: server
- Module: mod_log_config
LogFormat "%h %u %l %t \"%r\" %>s %b"
LogFormat
- Syntax: LogFormat "string" [nickname]
- Context: host
- Module: mod_log_config
This sets a customized format for the transfer log file. You can also use the LogFormat values shown below with the CustomLog directive, which establishes a separate, customized log file. This directive can be used to associate a log format with a format nickname, which can be used with the CustomLog directive or other instances of LogFormat instead of a full format string.
LogFormat "%400,501{User-agent}i"
LogFormat "%!200,304,302{Referer}i"
logs the Referer header for all requests that return an irregular server status code.
That means that you can do things such as
<VirtualHost host1.com>
LogFormat "string1"
. . .
</VirtualHost>
<VirtualHost host2.com>
LogFormat "string2"
. . .
</VirtualHost>
For a complete list of status codes and their meanings, see Appendix B.
CustomLog
- Syntax: CustomLog filename "string"
- Context: host
- Module: mod_log_config
With the CustomLog directive, you can create multiple logs for any purpose. Filename is a path to a log file. String is a variable string that sets the format of each log entry, and it uses the same variables as LogFormat above.
ErrorLog
- Syntax: ErrorLog filename|syslog
- Context: host
- Module: core
- Default: ErrorLog logs/error_log
The ErrorLog directive sets the path to the file used to log all general and CGI errors. If the filename does not begin with a slash (/), then it is assumed to be relative to the ServerRoot. Using "syslog" instead of a filename enables logging via syslogd(8), if the system supports it. For a sample error log, see "Error Logs" on page 1-6.
NOTE: Be sure to check this file occasionally to make sure that your site is running smoothly.
LogLevel
- Syntax: LogLevel level
- Context: host
- Module: core
- Default: LogLevel error
LogLevel sets the verbosity of the messages recorded in the error logs created by the ErrorLog directive. The following levels are available, in order of decreasing significance:
LogLevel info
is specified, then messages with log levels of "notice" and "warn" are also posted.
NOTE: A level of "crit" or below is recommended.
CookieLog
- Syntax: CookieLog filename
- Context: object
- Module: mod_log_config
This directive sets the filename of the session tracking log.
HostnameLookups
- Syntax: HostnameLookups on|off|double
- Context: server
- Module: core
- Default: HostnameLookups off
NOTE: Regardless of how this directive is set, double-reverse DNS lookups are performed for all requests that are subject to host-based access control.
PidFile
- Syntax: PidFile filename
- Context: server
- Module: core
- Default: PidFile logs/httpd.pid
ScoreBoardFile
- Syntax: ScoreBoardFile filename
- Context: server
- Module: core
NOTE: Operating systems with memory mapping functions do not use this directive.
IdentityCheck
- Syntax: IdentityCheck on|off
- Context: object
- Module: core
- Default: IdentityCheck off
NOTE: The information should not be trusted in any way except for rudimentary usage tracking.
ExtendedStatus
- Syntax: ExtendedStatus on|off
- Context: server
- Module: mod_status
- Default: ExtendedStatus off
AddModuleInfo
- Syntax: AddModuleInfo module string
- Context: host
- Module: mod_browser
AddModuleInfo mod_auth.c 'See <A HREF="http://www.apache.org/docs/mod/mod_auth.html">http://www.apache.org/docs/mod/mod_auth.html</A>'
SSL Logs
These logs record data about SSL transactions.
SSLLogFile
- Syntax: SSLLogFile filename
- Context: host
- Module: mod_ssl
SSLErrorFile
- Syntax: SSLErrorFile filename
- Context: host
- Module: mod_ssl
Stronghold uses the SSLErrorFile to record errors that occur during SSL transactions.
SSL_CertificateLogDir
- Syntax: SSL_CertificateLogDir path
- Context: object
- Module: mod_ssl
SSL_CertificateLogDir sets the path to the directory where Stronghold logs client certificates.
CGI Error Logs
ScriptLog
- Syntax: ScriptLog filename
- Context: server
- Module: mod_cgi
ScriptLogLength
- Syntax: ScriptLogLength bytes
- Context: server
- Module: mod_cgi
ScriptLogBuffer
- Syntax: ScriptLogBuffer bytes
- Context: server
- Module: mod_cgi
Special Logs
AgentLog
- Syntax: AgentLog file-pipe
- Context: host
- Module: mod_log_agent
- A filename relative to the ServerRoot.
- "| command," that is, a pipe to a program that receives the agent log information on its standard input. Note that a new program will not be started for a virtual host if it inherits the AgentLog from the main server.
NOTE: If a program is used, then it will be run under the user who started the server, not the user the server runs as. For example, this is root if the server was started by root.
RefererLog
- Syntax: RefererLog file-pipe
- Context: host
- Module: mod_log_referer
- A filename relative to the ServerRoot.
- "| command," that is, a pipe to the program that receives the referer log information on its standard input. A new program will not be started for a virtual host if it inherits the RefererLog from the main server.
NOTE: If a program is used, then it will be run under the user who started the server, not the user the server runs as. For example, this is root if the server was started by root.
RefererIgnore
- Syntax: RefererIgnore string1 [string2 . . . ]
- Context: host
- Module: mod_log_referer
RefererIgnore www.ncsa.uiuc.edu
prevents the module from logging references from www.ncsa.uiuc.edu.
Directory Tree
Aliases
Alias
- Syntax: Alias /path/ /actual/path/
- Context: host
- Module: mod_alias
Alias /icons/ /path/icons/
AliasMatch
- Syntax: AliasMatch regex path
- Context: server, host
- Module: mod_alias
This directive is equivalent to Alias, but uses standard regular expressions instead of simple prefix matching. The regex is matched against the requested URL. If it matches, the server substitutes any parenthesized matches into the given string and uses it as a filename. For example, one could use the following to activate the /icons directory:
AliasMatch ^/icons(.*) /usr/local/apache/icons$1
ScriptAlias
- Syntax: ScriptAlias /path/ /actual/path/
- Context: server
- Module: mod_alias
ScriptAliasMatch
- Syntax: ScriptAliasMatch regex path
- Context: server, host
- Module: mod_alias
This directive is equivalent to ScriptAlias, but uses standard regular expressions instead of simple prefix matching. The regex is matched against the requested URL. If it matches, the server substitutes any parenthesized matches into the given path string and uses it as a filename. For example, one might use the following to activate the standard /cgi-bin:
ScriptAliasMatch ^/cgi-bin(.*) /usr/local/apache/cgi-bin$1
Redirect
- Syntax: Redirect type /path/ URI
- Context: server
- Module: mod_alias
- "temp" for temporary redirections
- "perm" for resources that have been permanently relocated
- "gone" for resources that no longer exist
Redirect perm /secure/ https://www.host.com/secure/
NOTE: If URI points to a directory on your server, avoid "loops" by making sure that URI does not point back to path.
RedirectMatch
- Syntax: RedirectMatch [status regex URL
- Context: server, host
- Module: mod_alias
This directive is equivalent to Redirect, but uses standard regular expressions instead of simple prefix matching. The regex is matched against the requested URL. If it matches, the server substitutes any parenthesized matches into the given URL string and uses it as a filename. For example, one could use the following to redirect all GIF files to like-named JPEG files on another server:
RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
RedirectTemp
- Syntax: RedirectTemp URL-path URL
- Context: object
- Module: mod_alias
This directive is equivalent to
Redirect temp
RedirectPermanent
- Syntax: RedirectPermanent URL-path URL
- Context: object
- Module: mod_alias
This directive is equivalent to
Redirect perm
UserDir
- Syntax: UserDir directory
- Context: host
- Module: mod_userdir
- a directory name
- an absolute path
- a path with wildcards
Directory Indexing
- mod_dir uses one directive, DirectoryIndex, to set the default file for directory requests. Requests for directories are fulfilled with this file, if it exists.
- If the default file does not exist, mod_autoindex fulfills a directory request by generating an HTML index of the files in the requested directory.
DirectoryIndex
- Syntax: DirectoryIndex filename1 [filename2 . . . ] /path/to/error/page
- Context: object
- Module: mod_dir
- AllowOverride: Indexes
For example, if this directive is set to
DirectoryIndex index.html /errors/404.html
DirectoryIndex index.html
FancyIndexing
- Syntax: FancyIndexing on|off
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
If Stronghold finds no index file for a requested directory, it generates an HTML-formatted file list for that directory on the fly. Normally, this is just an unordered list of linked filenames. To generate icons and extra information, including modification dates, file sizes, and descriptions, set FancyIndexing to "on." Fancy indexes are also sortable. Users can click a column heading to sort by that column. Clicking the column heading again toggles between ascending and descending order. To suppress the sortable index feature, set IndexOptions to "SuppressColumnSorting."
AddIcon
- Syntax: AddIcon iconfilename filename1 [filename2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
AddIcon (EXE, /icons/executables.gif) .exe
AddIconByType
- Syntax: AddIconByEncoding iconfilename MIME-type1 [MIME-type2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
AddIconByEncoding
- Syntax: AddIconByEncoding iconfilename encoding-type1 [encoding-type2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
DefaultIcon
- Syntax: DefaultIcon iconfilename
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
HeaderName
- Syntax: HeaderName filename
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
ReadmeName
- Syntax: ReadmeName filename
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
IndexIgnore
- Syntax: IndexIgnore arg1 [arg2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
IndexIgnore ^\.
AddDescription
- Syntax: AddDescription "description" filename1 [filename2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
AddDescription "Chicago, 1968" /images/convention.gif
AddDescription "MPEG Movie File" .mpeg .mpg
AddAlt
- Syntax: AddAlt "description" filename1 [filename2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
AddAltByType
- Syntax: AddAltByType "description" MIME-type1
[MIME-type2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
AddAltByEncoding
- Syntax: AddAltByEncoding "description" encoding-type1 [encoding-type2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
IndexOptions
- Syntax: IndexOptions option1 [option2 . . . ]
- Context: object
- Module: mod_autoindex
- AllowOverride: Indexes
URL Spell-Checking
When all other modules fail to fulfill a request, Stronghold passes it to mod_speling. This is a URL spell-checking module that compares the names of the requested directory or file to existing directories and files. The comparison is case-insensitive and allows up to one extraneous character, omitted character, or character transposition. If no matching document is found, the request fails with a status code of "404 Not Found." If exactly one matching document is found, it is returned to the client with a redirection response. If more than one match is found, a list of matches is returned to the client with a status code of "300 Multiple Choices."
CheckSpelling
- Syntax: CheckSpelling on|off
- Context: object
- Module: mod_speling
- Default: CheckSpelling off
- The directory scan which is necessary for the spelling correction can impact the server's performance when many spelling corrections are being performed at the same time.
- The document trees should not contain sensitive files which could be accidentally matched by a spelling correction.
- The module is unable to correct misspelled usernames (as in http://www.host.com/~moniac/ for http://www.host.com/~monica/). It can only correct filenames and directory names.
File Handling and Preprocessing
filename.type.language.encoding
index.html.en.gz
Filetypes
MimeMagicFile
- Syntax: MimeMagicFile magicfilename
- Context: server, host
- Module: mod_mime_magic
TypesConfig
- Syntax: TypesConfig filename
- Context: server
- Module: mod_mime
AddType
- Syntax: AddType MIME-type file-suffix
- Context: object
- Module: mod_mime
- AllowOverride: FileInfo
With AddType, you can map MIME types to filename suffixes without editing the mime.types file.
ForceType
- Syntax: ForceType type
- Context: object
- Module: mod_mime
AddEncoding
- Syntax: AddEncoding encoding-type file-suffix
- Context: object
- Module: mod_mime
- AllowOverride: FileInfo
AddLanguage
- Syntax: AddLanguage language-type filename-suffix
- Context: object
- Module: mod_mime
- AllowOverride: FileInfo
DefaultType
- Syntax: DefaultType mime-type
- Context: object
- Module: core
- Default: DefaultType text/html
DefaultType image/gif
Metainformation
Metainformation refers to information about information. In the context of a Web server, metainformation takes the form of content digests or HTTP headers. A complete list of HTTP/1.1 headers appears in Appendix A.
ContentDigest
- Syntax: ContentDigest yes|no
- Context: server
- Module: core
MetaFiles
- Syntax: MetaFiles on|off
- Context: .htaccess
- Module: mod_cern_meta
- Default: MetaFiles off
MetaFiles enables and disables metafile processing on a per-directory basis.
MetaDir
- Syntax: MetaDir directory-name
- Context: .htaccess
- Module: mod_cern_meta
MetaSuffix
- Syntax: MetaSuffix suffix
- Context: .htaccess
- Module: mod_cern_meta
ExpiresActive
- Syntax: ExpireActive on|off
- Context: object
- Module: mod_expires
- AllowOverride: Indexes
ExpiresByType
- Syntax: ExpiresByType mime-type CODE
- Context: object
- Module: mod_expires
- AllowOverride: Indexes
- "M" indicates that the document expires n seconds after its last modification time.
- "A" indicates that the document expires n seconds after the client requests it.
ExpiresByType image/jpeg A2592000
ExpiresByType text/html M604800
ExpiresDefault
- Syntax: ExpiresDefault CODE
- Context: object
- Module: mod_expires
- AllowOverride: Indexes
- "M" indicates that the document expires n seconds after its last modification time.
- "A" indicates that the document expires n seconds after the client requests it.
Header
- Syntax: Header [set|append|add|unset] header value
- Context: object
- Module: mod_headers
The Header directives are processed in the following order:
- server
- virtual host
- <Directory> containers and .htaccess files
- <Location> containers
- <Files> containers
Order is important. For example, these two headers have different effects if they are reversed:
Header append Author "John P. Doe"
Header unset Author
ServerTokens
- Syntax: ServerTokens min[imal]|os|full
- Context: server
- Module: core
- Default: ServerTokens Full
This directive controls whether the Server header which is returned to clients includes a description of the generic OS-type of the server as well as information about compiled-in modules. The valid values are as follows:
Handlers
AddHandler
- Syntax: AddHandler handler-name filename-suffix
- Context: object
- Module: mod_mime
- AllowOverride: FileInfo
For example, you can use Stronghold's as-is module by uncommenting this line in httpd.conf:
AddHandler send-as-is asis
SetHandler
- Syntax: SetHandler handler
- Context: object
- Module: mod_mime
- AllowOverride: FileInfo
Handler can also be a third-party or custom handler that you add with AddHandler.
Action
- Syntax: Action handler|media-type script
- Context: object
- Module: mod_action
- AllowOverride: FileInfo
AddHandler imap-file .map
Action imap-file /cgi-bin/imap.cgi
Script
- Syntax: Script method script
- Context: object
- Module: mod_action
URL Rewriting
Stronghold includes mod_rewrite, a module that rewrites requested URLs that match a set of conditions. The rewritten request can be a URI, a URL, or a filepath with or without QUERY_STRING information. This powerful module can be used for an enormous variety of purposes, limited only by your imagination. It is documented in great detail at http://www.engelschall.com/sw/mod_rewrite/doc/mod_rewrite/toc.html.
RewriteEngine
- Syntax: RewriteEngine on|off
- Context: object
- Module: mod_rewrite
- AllowOverride: FileInfo
RewriteLog
- Syntax: RewriteLog filename
- Context: server
- Module: mod_rewrite
RewriteLogLevel
- Syntax: RewriteLogLevel n
- Context: server
- Module: mod_rewrite
RewriteLock
- Syntax: RewriteLock filename
- Context: host
- Module: mod_rewrite
RewriteOptions
- Syntax: RewriteOptions inherit
- Context: object
- Module: mod_rewrite
- AllowOverride: FileInfo
RewriteBase
- Syntax: RewriteBase URL
- Context: .htaccess only
- Module: mod_rewrite
- AllowOverride: FileInfo
This directive sets a base URL that mod_rewrite prepends to the result of a rewrite operation.
RewriteMap
- Syntax: RewriteMap mapname txt|dbm|prg:filename
- Context: object
- Module: mod_rewrite
RewriteCond
- Syntax: RewriteCond test-string condition-pattern
- Context: object
- Module: mod_rewrite
- AllowOverride: FileInfo
Test-string contains one or more of the following server variables:
HTTP_USER_AGENT
HTTP_REFERER
HTTP_COOKIE
HTTP_FORWARDED
HTTP_HOST
HTTP_PROXY_CONNECTION
HTTP_ACCEPT
REMOTE_ADDR
REMOTE_HOST
REMOTE_USER
REMOTE_IDENT
REQUEST_METHOD
SCRIPT_FILENAME
PATH_INFO
QUERY_STRING
AUTH_TYPE
DOCUMENT_ROOT
SERVER_ADMIN
SERVER_NAME
SERVER_PORT
SERVER_PROTOCOL
SERVER_SOFTWARE
SERVER_VERSION
TIME_YEAR
TIME_MON
TIME_DAY
TIME_HOUR
TIME_MIN
TIME_SEC
TIME_WDAY
API_VERSION
THE_REQUEST
REQUEST_URI
REQUEST_FILENAME
IS_SUBREQ
Any of these flags can also be prepended by an exclamation mark (!).
RewriteCond ${REMOTE_HOST} ^host1.* [OR]
RewriteCond ${REMOTE_HOST} ^host2.* [OR]
RewriteCond ${REMOTE_HOST} ^host3.*
RewriteRule
- Syntax: RewriteRule pattern substitute
- Context: object
- Module: mod_rewrite
- AllowOverride: FileInfo
- plain text
- pattern-group back-references ($N)
- server variables (%{VARIABLE})
- rewrite-map calls (${mapname:key|default}) to files defined by RewriteMap
Content Delivery
Content delivery refers to the way Stronghold manipulates and delivers your site's content, the media that end users experience. This section lists directives that control client request security and several forms of content delivery:
Client Request Security
By flooding a server with useless requests, a client can create a denial-of-service attack. These directives help prevent this type of attack by limiting the amount of data that the server accepts in any single client request.
LimitRequestBody
- Syntax: LimitRequestBody n
- Context: server
- Module: core
The LimitRequestBody directive sets the maximum size of the message body of a client request, in bytes. A request that includes a message body larger than n bytes is discarded, and Stronghold responds with status code 413 Request Entity Too Large. N must be an integer between 0 (meaning unlimited) and 2147483647 (2GB).
LimitRequestFields
- Syntax: LimitRequestFields n
- Context: server
- Module: core
The LimitRequestFields directive sets the maximum number of request header fields allowed in any single request. If a request includes more than n headers, the request is discarded and Stronghold responds with status code 400 Bad Request. N must be an integer between 0 (meaning unlimited) and 32767. If this directive is not present, the default is 100 bytes.
LimitRequestFieldSize
- Syntax: LimitRequestFieldSize n
- Context: server
- Module: core
The LimitRequestFieldSize directive sets the maximum size for all request headers, in bytes. If a request includes a header field larger than n bytes, the request is discarded and Stronghold responds with status code 400 Bad Request. N must be an integer between 0 (meaning unlimited) and the value of the compile-time constant DEFAULT_LIMIT_REQUEST_FIELDSIZE. The default value of this constant is 8190.
LimitRequestLine
- Syntax: LimitRequestLine n
- Context: server
- Module: core
GET /index.html HTTP/1.1
If this line is larger than n bytes, the request is discarded and Stronghold responds with status code 414 Request-URI Too Long. N must be an integer between 0 (meaning unlimited) and value of the compile-time constant DEFAULT_LIMIT_REQUEST_LINE. The default value of this constant is 8190.
Content Negotiation
"Content Negotiation" on page 9-4 provides a more detailed discussion of how content negotiation works.
CacheNegotiatedDocs
- Syntax: CacheNegotiatedDocs
- Context: server
- Module: mod_negotiation
LanguagePriority
- Syntax: LanguagePriority language-type1 [language-type2 . . . ]
- Context: object
- Module: mod_negotiation
- AllowOverride: FileInfo
LanguagePriority en fr jp it
Session Tracking
The mod_usertrack modules uses Netscape cookies to track sessions. The directives in this section enable session tracking and set cookie expiration times. For more information about session tracking, see "Tracking Sessions" on page 1-15.
CookieTracking
- Syntax: CookieTracking on|off
- Context: object
- Module: mod_usertrack
- AllowOverride: FileInfo
CookieTracking enables or disables session tracking for an object or host, or for the whole server.
CookieExpires
- Syntax: CookieExpires expiry-period
- Context: host
- Module: mod_usertrack
- years
- months
- weeks
- hours
- minutes
- seconds
CookieExpires "6 months 2 weeks 7 hours"
Imagemaps
Stronghold handles imagemaps internally, without the aid of CGI programs. For detailed information about the imagemap module, see "Server-Side Imagemaps" on page 9-1.
ImapMenu
- Syntax: ImapMenu option
- Context: object
- Module: mod_imap
- AllowOverride: Indexes
ImapDefault
- Syntax: ImapDefault action|URL
- Context: object
- Module: mod_imap
- AllowOverride: Indexes
ImapDefault specifies the action Stronghold takes if
- the point clicked by a user matches no valid coordinates and
- ImapMenu is set to "none" and
- there is no default directive in the imagemap file itself.
The value for ImapDefault can be a URL, or one of the following options:
ImapBase
- Syntax: ImapBase option|URL
- Context: object
- Module: mod_imap
- AllowOverride: Indexes
The value can be a URL, or one of the following options:
- "map": The URL of the imagemap file is the base URL.
- "referer": The URL of the referring document is the base URL.
Server-Side Includes
Server-side includes (SSIs) are simple, HTML-embedded commands that the server parses before it delivers the HTML file. SSIs are explained in detail in "Server-Side Includes" on page 9-6.
XBitHack
- Syntax: XBitHack off|on|full
- Context: object
- Module: mod_include
- AllowOverride: Options
- Default: XBitHack off
PHP/FI 2.0 Embedded Scripting
The PHP module performs HTML-embedded scripting for dynamic content. You can place PHP configuration directives in httpd.conf and in .htaccess files. If you use PHP, be sure to use the AddType directive to include .php files. Chapter 11 explains PHP in detail.
phpShowInfo
- Syntax: phpShowInfo on|off
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
When this directive is turned on, access information footers are added to each PHP-parsed file.
phpLastModified
- Syntax: phpLastModified on|off
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
NOTE: If you are using page logging, multiple accesses will not be logged.
phpLogging
- Syntax: phpLogging on|off
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
When this directive is turned on, Stronghold logs PHP activity.
phpDebug
- Syntax: phpDebug on|off
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
This directive toggles the automatic ?info debugging screen on or off. The default is off.
phpUploadTmpDir
- Syntax: phpUploadTmpDir directory
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
This directive sets the temporary directory for user-uploaded files.
phpDbmLogDir
- Syntax: phpDbmLogDir directory
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpSQLLogHost
- Syntax: phpSQLLogHost hostname
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
This directive sets the hostname where PHP can find the SQL logging database.
phpSQLLogDB
- Syntax: phpSQLLogDB database
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpMsqlLogHost
- Syntax: phpMsqlLogHost hostname
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
This directive sets the hostname where PHP can find the mSQL logging database.
phpMsqlLogDB
- Syntax: phpMsqlLogDB database
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpAccessDir
- Syntax: phpAccessDir directory
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
This directive sets the directory for PHP access control files.
phpMaxDataSpace
- Syntax: phpMaxDataSpace kilobytes
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
This directive sets the maximum size, in kilobytes, of a sub-pool in the PHP module.
phpIncludePath
- Syntax: phpIncludePath path1[:path2:path3. . . ]
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpAutoPrependFile
- Syntax: phpAutoPrependFile filename
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
The file specified by phpAutoPrependFile is parsed before the requested file using PHP's Include(filename) function. phpIncludePath applies. Keep in mind that an auto-prepended file makes it difficult you to use the Header("header_string") function in the requested file.
phpAutoAppendFile
- Syntax: phpAutoAppendFile filename
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpAdaDefDB
- Syntax: phpAdaDefDB database
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpAdaUser
- Syntax: phpAdaUser username
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpAdaPW
- Syntax: phpAdaPW password
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
phpEngine
- Syntax: phpEngine on|off
- Context: object
- Module: mod_php
This directive turns PHP parsing on or off. The default is on and this directive is only useful if you want to set AllowOverride to "FileInfo" and still disallow PHP parsing.
phpXBitHack
- Syntax: phpXBitHack on|off
- Context: object
- Module: mod_php
- AllowOverride: FileInfo
Client Authentication and Access Control
- authentication mode
- basic authentication
- Berkeley DB authentication
- DBM authentication
- digest authentication
- SSL certificate authentication and access control
- host-based access control
- anonymous logins
Authentication Mode
AuthType
- Syntax: AuthType Basic|Digest|Cert
- Context: object
- Module: core
Basic Authentication
AuthName
- Syntax: AuthName auth-domain
- Context: object
- Module: core
Require
- Syntax: Require entity-name entity1 [entity2 . . . ]
- Context: object
- Module: core
- AllowOverride: AuthConfig
This directive selects which authenticated users can access an object. The allowed values are
AuthType Basic
AuthName somedomain
AuthUserFile /web/users
AuthGroupFile /web/groups
require group admin
AuthGroupFile
- Syntax: AuthGroupFile filename
- Context: object
- Module: mod_auth
- AllowOverride: FileInfo
AuthUserFile
- Syntax: AuthUserFile filename
- Context: object
- Module: mod_auth
- AllowOverride: FileInfo
AuthAuthoritative
- Syntax: AuthAuthoritative on|off
- Context: object
- Module: mod_auth
- AllowOverride: AuthConfig
Setting the AuthAuthoritative directive to "off" allows authentication and authorization to be passed to lower level modules (as defined in the Configuration and modules.c files) if there is no user ID or rule matching the supplied user ID. If there is a user ID and/or rule specified, the usual password and access checks are applied and a failure gives a 401 Unauthorized reply.
A common use for this is in conjunction with one of the database modules; such as mod_auth_db, mod_auth_dbm, and mod_auth_anon. These modules supply the bulk of the user credential checking, but a few (administrator) related accesses fall through to a lower level with a well-protected AuthUserFile.
By default, AuthAuthoritative is set to "on" and an unknown userID or rule results in a 401 Unauthorized reply. Setting it to "off" keeps the system secure and forces NSCA-compliant behaviour.
Berkeley Database Authentication
These directives control user authentication and access control with Berkeley database files. The Berkeley database library is distributed at http://www.sleepycat.com/.
AuthDBGroupFile
- Syntax: AuthDBGroupFile filename
- Context: object
- Module: mod_auth_db
- AllowOverride: AuthConfig
NOTE: Make sure that the AuthDBGroupFile is stored outside the document tree of the Web server, and do not put it in the directory that it protects. Otherwise, clients will be able to download the AuthDBGroupFile.
AuthDBUserFile
- Syntax: AuthDBUserFile filename
- Context: object
- Module: mod_auth_db
- AllowOverride: AuthConfig
NOTE: Make sure that the AuthDBUserFile is stored outside the document tree of the Web server, and do not put it in the directory that it protects. Otherwise, clients will be able to download the AuthDBUserFile.
AuthDBAuthoritative
- Syntax: AuthDBAuthoritative yes|no
- Context: object
- Module: mod_auth_db
Database Manager Authentication
These directives control user authentication and access control using a database manager (DBM).
AuthDBMGroupFile
- Syntax: AuthDBMGroupFile filename
- Context: object
- Module: mod_auth_dbm
- AllowOverride: AuthConfig
NOTE: Make sure that the AuthDBMGroupFile is stored outside the document tree of the Web server, and do not put it in the directory that it protects. Otherwise, clients will be able to download the AuthDBMGroupFile.
AuthDBMUserFile
- Syntax: AuthDBMUserFile filename
- Context: object
- Module: mod_auth_dbm
- AllowOverride: AuthConfig
NOTE: Make sure that the AuthDBMUserFile is stored outside the document tree of the Web server, and do not put it in the directory that it protects. Otherwise, clients will be able to download the AuthDBMUserFile.
AuthDBMAuthoritative
- Syntax: AuthDBMAuthoritative yes|no
- Context: object
- Module: mod_auth_db
Digest Authentication
These directives perform MD5 digest authentication. When AuthType is set to "digest," Stronghold uses the AuthDigestFile for authentication. Digest authentication provides a more secure password system, but only works with supporting browsers.
AuthDigestFile
- Syntax: AuthDigestFile filename
- Context: object
- Module: mod_digest
- AllowOverride: AuthConfig
SSL Certificate Authentication and Access Control
When AuthType is set to "cert," Stronghold performs SSL certificate authentication based on the parameters specified by these directives. Client authentication is discussed in detail in "Client Authentication" on page 2-14.
SSLCACertificatePath
- Syntax: SSLCACertificatePath path
- Context: host
- Module: mod_ssl
SSLCACertificateFile
- Syntax: SSLCACertificateFile filename
- Context: host
- Module: mod_ssl
SSLVerifyClient
- Syntax: SSLVerifyClient 0|1|2
- Context: host
- Module: mod_ssl
This directive sets the X.509 Client Authentication option:
0 = No
1 = X.509 certificate optional
2 = X.509 certificate required
SSLVerifyDepth
- Syntax: SSLVerifyDepth n
- Context: host
- Module: mod_ssl
RequireSSL
- Syntax: RequireSSL on|off
- Context: object
- Module: mod_ssl
SSL_Require
- Syntax: SSL_Require any|none|groupname|"field-operator-match"
- Context: object
- Module: mod_ssl
SSL_Require any
SSL_Require none
SSL_Require "size GTE 1024"
SSL_Require "ou EQ \"Product Development\""
Field corresponds to a data field in the certificate, and it can be one of the following:
Operator can be one of the following:
SSL_Group
- Syntax: SSL_Group groupname "field operator match"
- Context: object only
- Module: mod_ssl
SSL_Group AdminGroup "ou EQ Administration"
<VirtualHost 140.233.117.80:443>
<Location />
SSL_Require AdminGroup
</Location>
</VirtualHost>
SSLFakeBasicAuth
- Syntax: SSLFakeBasicAuth
- Context: object
- Module: mod_ssl
Host-Based Access Control
BrowserMatch ^KnockKnock/2.0 let_me_in
<Directory /docroot>
order deny,allow
deny from all
allow from env=let_me_in
</Directory>
In this example, all browsers with the User-Agent string "KnockKnock/2.0" are allowed access, and all others are denied.
<Location /stronghold-status>
order deny, allow
deny from all
allow from yourhost.com
</Location>
<Location /stronghold-info>
order deny, allow
deny from all
allow from yourhost.com
</Location>
With this configuration, only users on your host can access server information.
order
- Syntax: order allow,deny|deny,allow|mutual-failure
- Context: object
- Module: mod_access
- AllowOverride: Limit
order deny,allow
allows access from a few hosts and deny access from all other hosts. If you enter
order allow,deny
satisfy
- Syntax: satisfy any|all
- Context: object
- Module: core
- AllowOverride: AuthConfig
- If the value is "all," then authentication succeeds only if both allow and Require succeed.
- If the value is "any," then authentication succeeds if either allow or Require succeed.
allow
- Syntax: allow from all|env=variable|host1 [host2 . . . ]
- Context: object
- Module: mod_access
- AllowOverride: Limit
- a complete or partial domain name
- a complete IP number
- a network/submask pair
A network/submask pair consists of a network IP and a netmask IP. For example:
allow from 10.1.0.0/255.255.0.0
- a classless inter-domain routing (CIDR) specification
allow from 10.1.0.0/16
allow from 10.1.0.0/255.255.0.0
For more information about classless inter-domain routing, see the CIDR FAQ at http://www.ibm.net.il/~hank/cidr.html.
deny
- Syntax: deny from all|env=variable|hostname1 [hostname2 . . . ]
- Context: object
- Module: mod_access
- AllowOverride: Limit
- a complete or partial domain name
- a complete IP number
- a network/submask pair
A network/submask pair consists of a network IP and a netmask IP. For example:
allow from 10.1.0.0/255.255.0.0
- a classless inter-domain routing (CIDR) specification
allow from 10.1.0.0/16
allow from 10.1.0.0/255.255.0.0
For more information about classless inter-domain routing, see the CIDR FAQ at http://www.ibm.net.il/~hank/cidr.html.
Anonymous Logins
Anonymous
- Syntax: Anonymous UserID1 [UserID2 . . . ]
- Context: object
- Module: mod_auth_anon
- AllowOverride: AuthConfig
Anonymous_MustGiveEmail
- Syntax: Anonymous_MustGiveEmail on|off
- Context: object
- Module: mod_auth_anon
- AllowOverride: AuthConfig
Anonymous_LogEmail
- Syntax: Anonymous_LogEmail on|off
- Context: object
- Module: mod_auth_anon
- AllowOverride: AuthConfig
Anonymous_VerifyEmail
- Syntax: Anonymous_VerifyEmail on|off
- Context: object
- Module: mod_auth_anon
- AllowOverride: AuthConfig
Anonymous_NoUserID
- Syntax: Anonymous_NoUserID on|off
- Context: object
- Module: mod_auth_anon
- AllowOverride: AuthConfig
Anonymous_Authoritative
- Syntax: Anonymous_Authoritative on|off
- Context: object
- Module: mod_auth_anon
- AllowOverride: AuthConfig
Server Authentication
Site Authentication
SSLCertificateFile
- Syntax: SSLCertificateFile filename
- Context: host
- Module: mod_ssl
SSLCertificateKeyFile
- Syntax: SSLCertificateKeyFile filename
- Context: host
- Module: mod_ssl
Proxy Authentication
These directives control server-side authentication during mirror proxy transactions. On the server side of a mirror proxy transaction, the server uses client certificates. Proxy authentication is discussed in greater detail in "Proxy Authentication" on page 2-17.
NOTE: Never use any client certificate other than one specifically created for the proxy server. Do not use a certificate created for a browser.
SSLProxyMachineCertPath
- Syntax: SSLProxyMachineCertPath path
- Context: server
- Module: mod_ssl
SSLProxyMachineCertFile
- Syntax: SSLProxyMachineCertFile filename
- Context: server
- Module: mod_ssl
SSLProxyCACertificatePath
- Syntax: SSLProxyCACertificatePath path
- Context: host
- Module: mod_ssl
SSLProxyCACertificateFile
- Syntax: SSLProxyCACertificateFile filename
- Context: host
- Module: mod_ssl
SSLProxyVerifyDepth
- Syntax: SSLProxyVerifyDepth n
- Context: host
- Module: mod_ssl
Encryption
Stronghold Web Server interoperates with the following ciphers:
Notice that some ciphers are only compatible with SSLv3 and TLSv1. In order to use those ciphers, you must enable one or both of those protocols using the SSLProtocol directive.
You can see the default list of ciphers by running the following command:
# ssleay ciphers -v
SSLCipherList
- Syntax: SSLCipherList cipher1[:cipher2:cipher3 . . . ]
- Context: host
- Context: mod_ssl
This directive (formerly SSLRequiredCiphers) specifies a list of permitted cipher types for initial SSL transmissions, in order of preference. This list applies only when the requested object does not have its own SSLRequireCipher or SSLBanCipher directives. If the client does not support any of the specified cipher-types, the server returns an error message. The value for cipher can be
- a cipher name, as it appears in the table above
- a cipher alias, specifying a group of ciphers with certain qualities
- SSL compatibility
- encryption strength
- cipher types
- key exchange types
- authentication types
- digest types
These are the valid cipher aliases:
You can also use these three modifiers with any item in the colon-separated lists:
- "+" pushes a cipher or alias to the end of the list, effectively deprioritizing it
- "-" suppresses a cipher or alias, specifically excluding it
- "!" is the same as "-"
For example, this is the default cipher configuration:
!ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP
You can see the default list of ciphers by running the following command:
# ssleay ciphers -v
SSLProxyCipherList
- Syntax: SSLProxyCipherList cipher1[:cipher2:cipher3 . . . ]
- Context: host
- Module: mod_ssl
- a cipher name, as it appears in the table on page 7-108
- a cipher alias, as it appears in the table on page 7-110
SSLRequireCipher
- Syntax: SSLRequireCipher cipher
- Context: object
- Module: mod_ssl
SSLBanCipher
- Syntax: SSLBanCipher cipher
- Context: object
- Module: mod_ssl
Sioux-Compatible Directives
- SSL_X509VerifyDir
- SSL_X509VerifyPolicy
- SSL_Log
- SSL_LogX509Attributes
- SSL_SessionDir
SSL_Connect
- Syntax: SSL_Connect on|off
- Context: host
- Module: mod_ssl
SSL_KeyFile
- Syntax: SSL_KeyFile filename
- Context: host
- Module: mod_ssl
SSL_CertFile
- Syntax: SSL_CertFile filename
- Context: host
- Module: mod_ssl
SSL_CipherSuite
- Syntax: SSL_CipherSuite cipher1[:cipher2 . . . ]
- Context: host
- Module: mod_ssl
SSL_ClientAuth
- Syntax: SSL_ClientAuth off|requested|required|paranoid
- Context: host
- Module: mod_ssl
SSL_X509VerifyDepth
- Syntax: SSL_X509VerifyDepth n
- Context: host
- Module: mod_ssl
[Top] [Prev] [Next] [Last]
© 1998 C2Net International
Feedback: stronghold-docs@c2.net![]()