From 94229d53540d15d7867a0f8d59283ee62c9e7abb Mon Sep 17 00:00:00 2001
From: Joshua Slive Warning This module provides for an HTTP 1.1 proxy / gateway
-server. Status: Extension
- This module implements a proxy/gateway for Apache. It implements
proxying capability for
This module was experimental in Apache 1.1.x. Improvements and bugfixes
were made in Apache v1.2.x and Apache v1.3.x, then the module underwent a major
overhaul for Apache v2.0. The protocol support was upgraded to HTTP/1.1,
-and filter support was enabled.
-
- Please note that the caching function present in mod_proxy up to Apache
-v1.3.x has been removed from mod_proxy and will be incorporated
-into a new module, mod_cache.
-
-
-Warning:
+
Apache HTTP Server Version 2.0
Apache Module mod_proxy
Description: Status: Extension Module Identifier: proxy_module Summary
-This module implements a proxy/gateway for Apache. It implements
+Apache module mod_proxy
-
-
-Source File: mod_proxy.c
-
-Module Identifier: proxy_module
-
-Compatibility: Available in Apache 1.1 and later.
-Summary
+FTP
,
CONNECT
(for SSL),
@@ -58,73 +18,52 @@ proxying capability for
HTTP/1.0
, and
HTTP/1.1
.
The module can be configured to connect to other proxy modules for these
-and other protocols.
+and other protocols.Directives
-
+and filter support was enabled.
Please note that the caching function present in +mod_proxy up to Apache v1.3.x has been removed from +mod_proxy and will be incorporated into a new module, mod_cache.
+Apache can be configured in both a forward and reverse +proxy configuration.
A forward proxy is an intermediate system that enables a browser to connect to a remote network to which it normally does not have access. A forward proxy can also be used to cache data, reducing load on the networks between the -forward proxy and the remote webserver. +forward proxy and the remote webserver.
-Apache's mod_proxy can be figured to -behave like a forward proxy using the ProxyRemote +
Apache's mod_proxy can be figured to behave like a forward proxy
+using the ProxyRemote
directive. In addition, caching of data can be achieved by configuring
-Apache mod_cache. Other dedicated forward proxy packages include
-Squid.
+Apache mod_cache
. Other dedicated forward proxy
+packages include Squid.
A reverse proxy is a webserver system that is capable of serving webpages sourced from other webservers - in addition to webpages on disk or generated dynamically by CGI - making these pages look like they originated at the -reverse proxy. +reverse proxy.
When configured with the mod_cache module the reverse proxy can act as a cache for slower backend webservers. The reverse proxy @@ -133,91 +72,96 @@ webpages served using different webserver systems or architectures to coexist inside the same URL space. Reverse proxy systems are also ideal for implementing centralised logging websites with many or diverse website backends. Complex multi-tier webserver systems can be constructed using an -Apache mod_proxy frontend and any number of backend webservers. +Apache mod_proxy frontend and any number of backend webservers.
The reverse proxy is configured using the
-ProxyPass and ProxyPassReverse directives. Caching can be
-enabled using mod_cache as with the forward proxy.
+ProxyPass
and ProxyPassReverse
directives. Caching can be
+enabled using mod_cache as with the forward proxy.
-
-<Directory proxy:*> -Order Deny,Allow -Deny from [machines you'd like *not* to allow by IP address or name] -Allow from [machines you'd like to allow by IP address or name] +Controlling access to your proxy
+ +You can control who can access your proxy via the normal
+ +<Directory>
+control block using the following example:+ +
+<Directory proxy:*>
+Order Deny,Allow
+Deny from all
+Allow from 192.168.0
</Directory> -+
A
+ +<Files>
block +will also work, and is the only method known to work for all possible +URLs in Apache versions earlier than 1.2b10.When configuring a reverse proxy, access control takes on the +attributes of the normal server
+ -A <Files> block will also work, and is the only method known to work -for all possible URLs in Apache versions earlier than 1.2b10.<directory>
configuration.-When configuring a reverse proxy, access control takes on the attributes of -the normal server
+An FTP URI is interpreted relative to the home directory of the user +who is logging in. Alas, to reach higher directory levels you cannot +use /../, as the dots are interpreted by the browser and not actually +sent to the FTP server. To address this problem, the so called "Squid +%2f hack" was implemented in the Apache FTP proxy; it is is a solution +which is also used by other popular proxy servers like the Squid Proxy Cache. By +prepending /%2f to the path of your request, you can make such a proxy +change the FTP starting directory to / (instead of the home +directory). + +configuration. - - Why doesn't file type xxx download via FTP?
+Why doesn't file type xxx +download via FTP?
-You probably don't have that particular file type defined as +You probably don't have that particular file type defined as application/octet-stream in your proxy's mime.types configuration -file. A useful line can be
+file. A useful line can be
-+-
application/octet-stream bin dms lha lzh exe class tgz taz - +
How can I force an FTP ASCII download of File xxx?
-In the rare situation where you must download a specific file using the FTP +How can I force an FTP ASCII download of +File xxx?
+ +In the rare situation where you must download a specific file using the FTP ASCII transfer method (while the default transfer is in binary mode), you can override mod_proxy's default by -suffixing the request with ;type=a to force an ASCII transfer. +suffixing the request with
-;type=a
to force an ASCII transfer. (FTP Directory listings are always executed in ASCII mode, however.)How can I access FTP files outside of my home directory?
+ +How can I access FTP files outside +of my home directory?
-An FTP URI is interpreted relative to the home directory of -the user who is logging in. Alas, to reach higher directory -levels you cannot use /../, as the dots are interpreted by the -browser and not actually sent to the FTP server. To address -this problem, the so called "Squid %2f hack" was implemented in -the Apache FTP proxy; it is is a solution which is also used by -other popular proxy servers like the -Squid Proxy Cache. -By prepending /%2f to the path of your request, you can make -such a proxy change the FTP starting directory to / (instead -of the home directory).
-Example: To retrieve the file/etc/motd
, -you would use the URL--ftp://user@host/%2f/etc/motd
Example: To retrieve the file +
+/etc/motd
, you would use the URL+ -
ftp://user@host/%2f/etc/motd
How can I hide the FTP cleartext password in my browser's URL line?
+How can I hide the FTP cleartext password +in my browser's URL line?
To log in to an FTP server by username and password, Apache uses different strategies. In absense of a user name and password in the URL altogether, -Apache sends an anomymous login to the FTP server, i.e., -
\ No newline at end of file diff --git a/docs/manual/mod/mod_ssl.html b/docs/manual/mod/mod_ssl.html index d745d34ca5..91d6b4227b 100644 --- a/docs/manual/mod/mod_ssl.html +++ b/docs/manual/mod/mod_ssl.html @@ -1,38 +1,9 @@ - - --user: anonymous
+Apache sends an anomymous login to the FTP server, i.e., ++
+user: anonymous
-This works for all popular FTP servers which are configured for -anonymous access.
password: apache_proxy@ -
-For a personal login with a specific username, you can embed +This works for all popular FTP servers which are configured for +anonymous access.
+ +For a personal login with a specific username, you can embed the user name into the URL, like in:
+ +ftp://username@host/myfile
. If the FTP server asks for a password when given this username (which it should), @@ -228,9 +172,10 @@ and if successful, the requested resource is presented. The advantage of this procedure is that your browser does not display the password in cleartext (which it would if you had usedftp://username:password@host/myfile
in -the first place). -
-Note that the password which is transmitted in such a way +the first place).+ -
Note
+The password which is transmitted in such a way is not encrypted on its way. It travels between your browser and the Apache proxy server in a base64-encoded cleartext string, and between the Apache proxy and the FTP server as plaintext. You should @@ -238,582 +183,96 @@ therefore think twice before accessing your FTP server via HTTP (or before accessing your personal files via FTP at all!) When using unsecure channels, an eavesdropper might intercept your password on its way. - +Why does Apache start more slowly when using the - proxy module?
+Why does Apache start more slowly when +using the proxy module?
-If you're using theProxyBlock
+If you're using the
ProxyBlock
directive, hostnames' IP addresses are looked up and cached during startup for later match test. This may take a few seconds (or more) -depending on the speed with which the hostname lookups occur.+depending on the speed with which the hostname lookups occur.
- -What other functions are useful for an intranet proxy server?
+What other functions are useful for an +intranet proxy server?
-An Apache proxy server situated in an intranet needs to forward external -requests through the company's firewall. However, when it has to access -resources within the intranet, it can bypass the firewall when accessing -hosts. The NoProxy directive is useful for specifying -which hosts belong to the intranet and should be accessed directly.
+An Apache proxy server situated in an intranet needs to forward +external requests through the company's firewall. However, when it has +to access resources within the intranet, it can bypass the firewall +when accessing hosts. The
NoProxy
directive is useful for +specifying which hosts belong to the intranet and should be accessed +directly.Users within an intranet tend to omit the local domain name from their WWW requests, thus requesting "http://somehost/" instead of "http://somehost.my.dom.ain/". Some commercial proxy servers let them get away with this and simply serve the request, implying a configured -local domain. When the ProxyDomain directive +local domain. When the
-ProxyDomain
directive is used and the server is configured for proxy service, Apache can return a redirect response and send the client to the correct, fully qualified, server address. This is the preferred method since the user's bookmark files will then contain fully qualified hosts.
-ProxyPreserveHost directive
-Syntax: ProxyPreserveHost on|off
-Default:ProxyPreserveHost Off
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyPreserveHost is only available in -Apache 2.0.31 and later.- -When enabled, this option will pass the Host: line from the incoming request to -the proxied host, instead of the hostname specified in the proxypass line. -
-This option should normally be turned 'off'.
- -
- - -ProxyRequests directive
-Syntax: ProxyRequests on|off
-Default:ProxyRequests Off
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyRequests is only available in -Apache 1.1 and later.- -This allows or prevents Apache from functioning as a forward proxy -server. (Setting ProxyRequests to 'off' does not disable use of the ProxyPass directive.) - -
In a typical reverse proxy configuration, this option should be set to -'off'. - -
- -ProxyRemote directive
-Syntax: ProxyRemote match remote-server
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyRemote is only available in -Apache 1.1 and later.- -This defines remote proxies to this proxy. match is either the -name of a URL-scheme that the remote server supports, or a partial URL -for which the remote server should be used, or '*' to indicate the -server should be contacted for all requests. remote-server is a -partial URL for the remote server. Syntax: - -
- remote-server = protocol://hostname[:port] -- -protocol is the protocol that should be used to communicate -with the remote server; only "http" is supported by this module. --Example: -
- ProxyRemote http://goodguys.com/ http://mirrorguys.com:8000 - ProxyRemote * http://cleversite.com - ProxyRemote ftp http://ftpproxy.mydomain.com:8080 -- -In the last example, the proxy will forward FTP requests, encapsulated -as yet another HTTP proxy request, to another proxy which can handle -them. - -This option also supports reverse proxy configuration - a backend webserver -can be embedded within a virtualhost URL space even if that server is hidden -by another forward proxy. - -
- -ProxyPass directive
-Syntax: ProxyPass path url
-or: ProxyPass url when placed in a <location> directive (Apache 2.0 only)
-or: ProxyPass path ! to exclude a path from being proxied. -
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyPass is only available in -Apache 1.1 and later.- -This directive allows remote servers to be mapped into the space of the local -server; the local server does not act as a proxy in the conventional sense, -but appears to be a mirror of the remote server. path is the name of -a local virtual path; url is a partial URL for the remote server. -
-Suppose the local server has address http://wibble.org/; then -
- ProxyPass /mirror/foo/ http://foo.com/ --will cause a local request for the -<http://wibble.org/mirror/foo/bar> to be -internally converted into a proxy request to -<http://foo.com/bar>. --The ! directive is useful in situations where you don't want to reverse-proxy -a subdirectory. eg. -
- ProxyPass /mirror/foo/i ! - ProxyPass /mirror/foo http://foo.com --will proxy all requests to /mirror/foo to foo.com EXCEPT requests made to /mirror/foo/i -NB: order is important. you need to put the exclusions BEFORE the general proxypass directive - -
- -ProxyPassReverse directive
-Syntax: ProxyPassReverse path url
-or: ProxyPassReverse url when placed in a <location> directive (Apache 2.0 only)
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyPassReverse is only available in -Apache 1.3b6 and later.- -This directive lets Apache adjust the URL in the Location, -Content-Location and URI headers on -HTTP redirect responses. This is essential when Apache is used as -a reverse proxy to avoid by-passing the reverse proxy because of HTTP -redirects on the backend servers which stay behind the reverse proxy. -
-path is the name of a local virtual path.
-url is a partial URL for the remote server - the same way they are -used for the ProxyPass directive. --Example:
-Suppose the local server has address http://wibble.org/; then -- ProxyPass /mirror/foo/ http://foo.com/ - ProxyPassReverse /mirror/foo/ http://foo.com/ --will not only cause a local request for the -<http://wibble.org/mirror/foo/bar> to be internally -converted into a proxy request to <http://foo.com/bar> (the -functionality ProxyPass provides here). It also takes care of -redirects the server foo.com sends: when http://foo.com/bar is -redirected by him to http://foo.com/quux Apache adjusts this to -http://wibble.org/mirror/foo/quux before forwarding the HTTP -redirect response to the client. --Note that this ProxyPassReverse directive can also be used in -conjunction with the proxy pass-through feature ("RewriteRule ... -[P]") from -mod_rewrite because its doesn't depend on a corresponding -ProxyPass directive. - -
- -AllowCONNECT directive
-Syntax: AllowCONNECT port - [port] ...
-Default: AllowCONNECT 443 563
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: AllowCONNECT is only -available in Apache 1.3.2 and later.- -The AllowCONNECT directive specifies a list of port numbers -to which the proxy CONNECT method may connect. -Today's browsers use this method when a https connection -is requested and proxy tunneling over http is in effect.
-By default, only the default https port (443) and the default -snews port (563) are enabled. Use the AllowCONNECT -directive to overrride this default and allow connections to the -listed ports only. - -
- -ProxyBlock directive
-Syntax: ProxyBlock *|word|host|domain - [word|host|domain] ...
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyBlock is only available in -Apache 1.2 and later.- -The ProxyBlock directive specifies a list of words, hosts and/or domains, -separated by spaces. HTTP, HTTPS, and FTP document requests to sites whose -names contain matched words, hosts or domains are blocked by the -proxy server. The proxy module will also attempt to determine IP addresses of -list items which may be hostnames during startup, and cache them for match -test as well. Example: - -
- ProxyBlock joes-garage.com some-host.co.uk rocky.wotsamattau.edu -- -'rocky.wotsamattau.edu' would also be matched if referenced by IP address.- -Note that 'wotsamattau' would also be sufficient to match 'wotsamattau.edu'.
- -Note also that - -
-ProxyBlock * -- -blocks connections to all sites. - -
- -ProxyReceiveBufferSize directive
-Syntax: ProxyReceiveBufferSize bytes
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyReceiveBufferSize is only available in -Apache 1.3 and later.- -The ProxyReceiveBufferSize directive specifies an explicit network buffer size -for outgoing HTTP and FTP connections, for increased throughput. It has to be -greater than 512 or set to 0 to indicate that the system's default buffer size -should be used. - -
-Example: - -
- ProxyReceiveBufferSize 2048 --
- -ProxyMaxForwards directive
-Syntax: ProxyMaxForwards bytes
-Default: 10
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyMaxForwards is only available in -Apache 2.0 and later.- -The ProxyMaxForwards directive specifies the maximum number of proxies -through which a request may pass. This is set to prevent infinite proxy -loops, or a DoS attack. - -
-Example: - -
- ProxyMaxForwards 10 -- -
- -NoProxy directive
-Syntax: NoProxy - Domain|SubNet|IpAddr|Hostname -[Domain|SubNet|IpAddr|Hostname] ...
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: NoProxy is only available in -Apache 1.3 and later.- -This directive is only useful for Apache proxy servers within intranets. -The NoProxy directive specifies a list of subnets, IP addresses, hosts -and/or domains, separated by spaces. A request to a host which matches -one or more of these is always served directly, without forwarding to -the configured ProxyRemote proxy server(s). -
-Example: - -
- ProxyRemote * http://firewall.mycompany.com:81 +AllowCONNECT Directive
Description: Syntax: AllowCONNECT port [port] ... Default: AllowCONNECT 443 563
Context: server config, virtual host Status: Extension Module: mod_proxy + The
+AllowCONNECT
directive specifies a list +of port numbers to which the proxyCONNECT
method may +connect. Today's browsers use this method when a https +connection is requested and proxy tunneling over http is in +effect.
By default, only the default https port (443) and the +default snews port (563) are enabled. Use the +AllowCONNECT
directive to overrride this default and +allow connections to the listed ports only.NoProxy Directive
Description: Syntax: NoProxy + Domain| + SubNet| + IpAddr| + Hostname +[Domain| + SubNet| + IpAddr| + Hostname] ... Context: server config, virtual host Status: Extension Module: mod_proxy + This directive is only useful for Apache proxy servers within +intranets. The
+ +NoProxy
directive specifies a +list of subnets, IP addresses, hosts and/or domains, separated by +spaces. A request to a host which matches one or more of these is +always served directly, without forwarding to the configured +ProxyRemote
proxy server(s).+ +
Example
+ ProxyRemote * http://firewall.mycompany.com:81
NoProxy .mycompany.com 192.168.112.0/21 - -The arguments to the NoProxy directive are one of the following type list: +The arguments to the NoProxy directive are one of the following type list:
- - -
- -- Domain
+ +- + Domain
- A Domain is a partially qualified DNS domain name, preceded by a period. It represents a list of hosts which logically belong to the same DNS domain or zone (i.e., the suffixes of the hostnames are all ending in Domain).
- - -
- Examples: .com .apache.org.
+ Examples:.com
.apache.org.
To distinguish Domains from Hostnames (both syntactically and semantically; a DNS domain can have a DNS A record, too!), Domains are always written with a leading period.
Note: Domain name comparisons are done without regard to the case, and Domains are always assumed to be anchored in the root - of the DNS tree, therefore two domains .MyDomain.com and - .mydomain.com. (note the trailing period) are + of the DNS tree, therefore two domains.MyDomain.com
and +.mydomain.com.
(note the trailing period) are considered equal. Since a domain comparison does not involve a DNS - lookup, it is much more efficient than subnet comparison. + lookup, it is much more efficient than subnet comparison.- SubNet
+ +- + SubNet
- A SubNet is a partially qualified internet address in numeric (dotted quad) form, optionally followed by a slash and the netmask, specified as the number of significant bits in the @@ -824,44 +283,40 @@ The arguments to the NoProxy directive are one of the following type list: only be multiples of 8 bits wide.)
- - -
Examples:-
As a degenerate case, a SubNet with 32 valid bits is the equivalent to an IPAddr, while a SubNet with zero valid bits (e.g., 0.0.0.0/0) is the same as the constant - _Default_, matching any IP address. + _Default_, matching any IP address.- 192.168 or 192.168.0.0 +
192.168
or192.168.0.0
- the subnet 192.168.0.0 with an implied netmask of 16 valid bits - (sometimes used in the netmask form 255.255.0.0) -
- 192.168.112.0/21 -
- the subnet 192.168.112.0/21 with a netmask of 21 - valid bits (also used in the form 255.255.248.0) + (sometimes used in the netmask form
+255.255.0.0
)- +
192.168.112.0/21
- the subnet
192.168.112.0/21
with a netmask of 21 + valid bits (also used in the form 255.255.248.0)- IPAddr
+ +- + IPAddr
- A IPAddr represents a fully qualified internet address in numeric (dotted quad) form. Usually, this address represents a host, but there need not necessarily be a DNS domain name connected with the address.
- - -
Example: 192.168.123.7
Note: An IPAddr does not need to be resolved by the DNS - system, so it can result in more effective apache performance. -See Also: - DNS Issues
+ system, so it can result in more effective apache performance.- Hostname
+ +- + Hostname
- A Hostname is a fully qualified DNS domain name which can - be resolved to one or more IPAddrs via the DNS domain name service. + be resolved to one or more IPAddrs via the DNS domain name service. It represents a logical host (in contrast to Domains, see - above) and must be resolvable to at least one IPAddr (or often to a list of hosts + above) and must be resolvable to at least one IPAddr (or often to a list of hosts with different IPAddr's).
- Examples: prep.ai.mit.edu - www.apache.org.
+ Examples:prep.ai.mit.edu
+www.apache.org.
Note: In many situations, it is more effective to specify an IPAddr in place of a Hostname since a DNS lookup @@ -870,190 +325,207 @@ The arguments to the NoProxy directive are one of the following type list: link.
Note: Hostname comparisons are done without regard to the case, and Hostnames are always assumed to be anchored in the root - of the DNS tree, therefore two hosts WWW.MyDomain.com - and www.mydomain.com. (note the trailing period) are - considered equal.
-See Also: -DNS Issues
-
- -ProxyTimeout directive
-Syntax: ProxyTimeout n seconds
-Default: server default timeout
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyDomain is only available in -Apache 2.0.31 and later.+ of the DNS tree, therefore two hosts
WWW.MyDomain.com
+ andwww.mydomain.com.
(note the trailing period) are + considered equal. + +See also
ProxyBlock Directive
Description: Syntax: ProxyBlock *|word|host|domain +[word|host|domain] ... Context: server config, virtual host Status: Extension Module: mod_proxy + The
+ +ProxyBlock
directive specifies a list of +words, hosts and/or domains, separated by spaces. HTTP, HTTPS, and +FTP document requests to sites whose names contain matched words, +hosts or domains are blocked by the proxy server. The proxy +module will also attempt to determine IP addresses of list items which +may be hostnames during startup, and cache them for match test as +well. Example:-
+ ProxyBlock joes-garage.com some-host.co.uk rocky.wotsamattau.edu +
This directive allows a user to specifiy a timeout on proxy requests. -This is usefull when you have a slow/buggy appserver which hangs, -and you would rather just return a timeout and fail gracefully instead -of waiting however long it takes the server to return -
-
- - -ProxyDomain directive
-Syntax: ProxyDomain Domain
-Default: None
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyDomain is only available in -Apache 1.3 and later.- -This directive is only useful for Apache proxy servers within intranets. -The ProxyDomain directive specifies the default domain which the apache -proxy server will belong to. If a request to a host without a domain name -is encountered, a redirection response to the same host -with the configured Domain appended will be generated. -
-Example: +
'rocky.wotsamattau.edu' would also be matched if referenced by IP +address.
-- ProxyRemote * http://firewall.mycompany.com:81 - NoProxy .mycompany.com 192.168.112.0/21 - ProxyDomain .mycompany.com -+Note that 'wotsamattau' would also be sufficient to match +'wotsamattau.edu'.
-
- -ProxyVia directive
-Syntax: ProxyVia on|off|full|block
-Default: ProxyVia off
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyVia is only available in -Apache 1.3.2 and later.- -This directive controls the use of the Via: HTTP header -by the proxy. Its intended use is to control the flow of of proxy -requests along a chain of proxy servers. -See RFC2068 (HTTP/1.1) for an explanation of Via: header lines.
-
+- If set to off, which is the default, no special -processing is performed. If a request or reply contains a Via: header, -it is passed through unchanged. -
- If set to on, each request and reply will get a Via: header -line added for the current host. -
- If set to full, each generated Via: header line will -additionally have the Apache server version shown as a Via: comment field. -
- If set to block, every proxy request will have all its -Via: header lines removed. No new Via: header will be generated. -
Note also that
+ +-
+ProxyBlock * +
- -ProxyErrorOverride directive
-Syntax: ProxyErrorOverrideon
-Default: off
-Context: server config, virtual host
-Override: Not applicable
-Status: Base
-Module: mod_proxy
-Compatibility: ProxyErrorOverride -Apache 2.0 and later.- -This directive is useful for reverse-proxy setups, where you want to +
blocks connections to all sites.
+ +ProxyDomain Directive
Description: Syntax: ProxyDomain Domain Context: server config, virtual host Status: Extension Module: mod_proxy + This directive is only useful for Apache proxy servers within +intranets. The
+ +ProxyDomain
directive specifies +the default domain which the apache proxy server will belong to. If a +request to a host without a domain name is encountered, a redirection +response to the same host with the configured Domain appended +will be generated.+
Example
+ ProxyRemote * http://firewall.mycompany.com:81
+ NoProxy .mycompany.com 192.168.112.0/21
+ ProxyDomain .mycompany.com +ProxyErrorOverride Directive
Description: Syntax: ProxyErrorOverride On|Off Default: ProxyErrorOverride Off
Context: server config, virtual host Status: Extension Module: mod_proxy Compatibility: Available in version 2.0 and later + This directive is useful for reverse-proxy setups, where you want to have a common look and feel on the error pages seen by the end user. This also allows for included files (via mod_include's SSI) to get the error code and act accordingly (default behavior would display the error page of the proxied server, turning this on shows the SSI -Error message). +Error message).
+ProxyMaxForwards Directive
Description: Syntax: ProxyMaxForwards number Default: ProxyMaxForwards 10
Context: server config, virtual host Status: Extension Module: mod_proxy Compatibility: Available in Apache 2.0 and later + The
+ +ProxyMaxForwards
directive specifies the +maximum number of proxies through which a request may pass. This is +set to prevent infinite proxy loops, or a DoS attack.+
Example
+ ProxyMaxForwards 10 +
ProxyPass Directive
Description: Syntax: ProxyPass [path] !|url Context: server config, virtual host Status: Extension Module: mod_proxy + + This directive allows remote servers to be mapped into the space of +the local server; the local server does not act as a proxy in the +conventional sense, but appears to be a mirror of the remote +server. path is the name of a local virtual path; +url is a partial URL for the remote server.
+ +Suppose the local server has address
+http://wibble.org/
; +then+
+ ProxyPass /mirror/foo/ http://foo.com/ +
will cause a local request for the +<
+http://wibble.org/mirror/foo/bar
> to be +internally converted into a proxy request to +<http://foo.com/bar
>.+The ! directive is useful in situations where you don't want to reverse-proxy +a subdirectory. eg.
++
+ ProxyPass /mirror/foo/i !
+ ProxyPass /mirror/foo http://foo.com +will proxy all requests to /mirror/foo to foo.com EXCEPT requests made to /mirror/foo/i
+ ++
NB: order is important. you need to put the exclusions BEFORE the general proxypass directive ProxyPassReverse Directive
Description: Syntax: ProxyPassReverse [path] url Context: server config, virtual host Status: Extension Module: mod_proxy + + This directive lets Apache adjust the URL in the
+ +Location
, +Content-Location
andURI
headers on +HTTP redirect responses. This is essential when Apache is used as +a reverse proxy to avoid by-passing the reverse proxy because of HTTP +redirects on the backend servers which stay behind the reverse proxy.path is the name of a local virtual path.
+ +
+url is a partial URL for the remote server - the same way they are +used for theProxyPass
directive.+Example:
+
+Suppose the local server has addresshttp://wibble.org/
; then+
+ ProxyPass /mirror/foo/ http://foo.com/
+ ProxyPassReverse /mirror/foo/ http://foo.com/ +will not only cause a local request for the +<
+http://wibble.org/mirror/foo/bar
> to be internally +converted into a proxy request to <http://foo.com/bar
> (the +functionalityProxyPass
provides here). It also takes care of +redirects the server foo.com sends: whenhttp://foo.com/bar
is +redirected by him tohttp://foo.com/quux
Apache adjusts this to +http://wibble.org/mirror/foo/quux
before forwarding the HTTP +redirect response to the client.+Note that this
+ProxyPassReverse
directive can +also be used in conjunction with the proxy pass-through feature +("RewriteRule ... [P]
") from +mod_rewrite
because its doesn't depend on a +correspondingProxyPass
+directive.ProxyPreserveHost Directive
Description: Syntax: ProxyPreserveHost on|off Default: ProxyPreserveHost Off
Context: server config, virtual host Status: Extension Module: mod_proxy Compatibility: Available in +Apache 2.0.31 and later. + When enabled, this option will pass the Host: line from the +incoming request to the proxied host, instead of the hostname +specified in the proxypass line. +
+This option should normally be turned 'off'.
+ProxyReceiveBufferSize Directive
Description: Syntax: ProxyReceiveBufferSize bytes Context: server config, virtual host Status: Extension Module: mod_proxy + The
+ProxyReceiveBufferSize
directive +specifies an explicit network buffer size for outgoing HTTP and FTP +connections, for increased throughput. It has to be greater than 512 +or set to 0 to indicate that the system's default buffer size should +be used.+
Example
+ ProxyReceiveBufferSize 2048 +
ProxyRemote Directive
Description: Syntax: ProxyRemote match remote-server Context: server config, virtual host Status: Extension Module: mod_proxy + This defines remote proxies to this proxy. match is either the +name of a URL-scheme that the remote server supports, or a partial URL +for which the remote server should be used, or '*' to indicate the +server should be contacted for all requests. remote-server is a +partial URL for the remote server. Syntax:
+ ++ remote-server = protocol://hostname[:port] ++ +protocol is the protocol that should be used to communicate +with the remote server; only "http" is supported by this module.
+Example:
+- - - +
+ ProxyRemote http://goodguys.com/ http://mirrorguys.com:8000
+ ProxyRemote * http://cleversite.com
+ ProxyRemote ftp http://ftpproxy.mydomain.com:8080 +In the last example, the proxy will forward FTP requests, encapsulated +as yet another HTTP proxy request, to another proxy which can handle +them.
+ +This option also supports reverse proxy configuration - a backend +webserver can be embedded within a virtualhost URL space even if that +server is hidden by another forward proxy.
+ProxyRequests Directive
Description: Syntax: ProxyRequests on|off Default: ProxyRequests Off
Context: server config, virtual host Status: Extension Module: mod_proxy + This allows or prevents Apache from functioning as a forward proxy +server. (Setting ProxyRequests to 'off' does not disable use of the +
+ProxyPass
directive.)In a typical reverse proxy configuration, this option should be set to +'off'.
+ProxyTimeout Directive
Description: Syntax: ProxyTimeout seconds Default: ProxyTimeout 300
Context: server config, virtual host Status: Extension Module: mod_proxy Compatibility: Available in +Apache 2.0.31 and later + This directive allows a user to specifiy a timeout on proxy requests. +This is usefull when you have a slow/buggy appserver which hangs, +and you would rather just return a timeout and fail gracefully instead +of waiting however long it takes the server to return +
+ProxyVia Directive
Description: Syntax: ProxyVia on|off|full|block Default: ProxyVia off
Context: server config, virtual host Status: Extension Module: mod_proxy + This directive controls the use of the
+ +Via:
HTTP +header by the proxy. Its intended use is to control the flow of of +proxy requests along a chain of proxy servers. See RFC2068 (HTTP/1.1) +for an explanation ofVia:
header lines.+
- If set +to off, which is the default, no special processing is +performed. If a request or reply contains a
+ +Via:
header, +it is passed through unchanged.- If set to on, each +request and reply will get a
+ +Via:
header line added for +the current host.- If set to full, each generated
+ +Via:
header +line will additionally have the Apache server version shown as a +Via:
comment field.- If set to block, every +proxy request will have all its
+Via:
header lines +removed. No newVia:
header will be generated.Apache HTTP Server Version 2.0
Apache module mod_ssl - - - - - - - - -Module mod_ssl
- -This module provides strong cryptography using the Secure Sockets -Layer (SSL) and Transport Layer Security (TLS) protocols.
- -Status: Extension
- -
-Source File: -mod_ssl.c
-Module Identifier: -ssl_moduleSummary
- +mod_ssl - Apache HTTP Server Apache HTTP Server Version 2.0
Apache Module mod_ssl
Description: Strong cryptography using the Secure Sockets +Layer (SSL) and Transport Layer Security (TLS) protocols Status: Extension Module Identifier: ssl_module Summary
This module provides SSL v2/v3 and TLS v1 support for the Apache HTTP Server. It was contributed by Ralf S. Engeschall based on his mod_ssl project and originally derived from work by Ben Laurie.
@@ -42,42 +13,14 @@ to provide the cryptography engine.Further details, discussion, and examples are provided in the SSL documentation.
+Directives
- SSLCACertificateFile
- SSLCACertificatePath
- SSLCARevocationFile
- SSLCARevocationPath
- SSLCertificateChainFile
- SSLCertificateFile
- SSLCertificateKeyFile
- SSLCipherSuite
- SSLEngine
- SSLLog
- SSLLogLevel
- SSLMutex
- SSLOptions
- SSLPassPhraseDialog
- SSLProtocol
- SSLRandomSeed
- SSLRequire
- SSLRequireSSL
- SSLSessionCache
- SSLSessionCacheTimeout
- SSLVerifyClient
- SSLVerifyDepth
Environment Variables
-Directives
- --
- -- SSLPassPhraseDialog
-- SSLMutex
-- SSLRandomSeed
-- SSLSessionCache
-- SSLSessionCacheTimeout
-- SSLEngine
-- SSLProtocol
-- SSLCipherSuite
-- SSLCertificateFile
-- SSLCertificateKeyFile
-- SSLCertificateChainFile
-- SSLCACertificatePath
-- SSLCACertificateFile
-- SSLCARevocationPath
-- SSLCARevocationFile
-- SSLVerifyClient
-- SSLVerifyDepth
-- SSLLog
-- SSLLogLevel
-- SSLOptions
-- SSLRequireSSL
-- SSLRequire
-Environment Variables
-This module provides a lot of SSL information as additional environment +This module provides a lot of SSL information as additional environment variables to the SSI and CGI namespace. The generated variables are listed in the table below. For backward compatibility the information can -be made available under different names, too. Look in the Compatibility chapter for details on the -compatibility variables. -
+be made available under different names, too. Look in the Compatibility chapter for details on the +compatibility variables.
+-@@ -87,9 +30,9 @@ compatibility variables.
- Variable Name: -Value Type: -Description: +Variable Name: +Value Type: +Description: HTTPS
flag HTTPS is being used. @@ -111,8 +54,8 @@ compatibility variables. SSL_PROTOCOL
string The SSL protocol version (SSLv2, SSLv3, TLSv1) SSL_CLIENT_A_SIG
string Algorithm used for the signature of client's certificate SSL_CLIENT_A_KEY
string Algorithm used for the public key of client's certificate - SSL_CLIENT_CERT
string PEM-encoded client certificate - SSL_CLIENT_CERT_CHAIN
nstring PEM-encoded certificates in client certificate chain + SSL_CLIENT_VERIFY
string NONE, SUCCESS, GENEROUS or FAILED:reason + SSL_CLIENT_CERT_CHAIN
nstring PEM-encoded certificates in client certificate chain SSL_CLIENT_VERIFY
string NONE
,SUCCESS
,GENEROUS
orFAILED:
reasonSSL_SERVER_M_VERSION
string The version of the server certificate SSL_SERVER_M_SERIAL
string The serial of the server certificate @@ -131,737 +74,138 @@ compatibility variables. SSL_SERVER_S_DN
string Subject DN in server's certificate -
Custom Log Formats
-When mod_ssl is built into Apache or at least loaded (under DSO situation) -additional functions exist for the Custom Log Format of mod_log_config. First there is an additional -``%{
varname}x
'' eXtension format function -which can be used to expand any variables provided by any module, especially -those provided by mod_ssl which can you find in the above table. + +When
mod_ssl
is built into Apache or at least +loaded (under DSO situation) additional functions exist for the Custom Log Format of +mod_log_config
. First there is an +additional ``%{
varname}x
'' +eXtension format function which can be used to expand any variables +provided by any module, especially those provided by mod_ssl which can +you find in the above table.For backward compatibility there is additionally a special ``
%{
name}c
'' cryptography format function -provided. Information about this function is provided in the Compatibility chapter. +provided. Information about this function is provided in the Compatibility chapter.-Example: -
-+Example: ++
CustomLog logs/ssl_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" - - - -
- --
- -SSLPassPhraseDialog directive
--
-
-- -- --
-- -- --
-- -Name: SSLPassPhraseDialog - -Description: Type of pass phrase dialog for encrypted private keys - Syntax: SSLPassPhraseDialog
type- Default: SSLPassPhraseDialog builtin
- Context: server config - Override: Not applicable - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.1 -When Apache starts up it has to read the various Certificate (see SSLCertificateFile) and Private Key (see SSLCertificateKeyFile) files of the -SSL-enabled virtual servers. Because for security reasons the Private Key -files are usually encrypted, mod_ssl needs to query the administrator for a -Pass Phrase in order to decrypt those files. This query can be done in two ways -which can be configured by type: -
-
-builtin
-- This is the default where an interactive terminal dialog occurs at startup - time just before Apache detaches from the terminal. Here the administrator - has to manually enter the Pass Phrase for each encrypted Private Key file. - Because a lot of SSL-enabled virtual hosts can be configured, the - following reuse-scheme is used to minimize the dialog: When a Private Key - file is encrypted, all known Pass Phrases (at the beginning there are - none, of course) are tried. If one of those known Pass Phrases succeeds no - dialog pops up for this particular Private Key file. If none succeeded, - another Pass Phrase is queried on the terminal and remembered for the next - round (where it perhaps can be reused). -
- This scheme allows mod_ssl to be maximally flexible (because for N encrypted - Private Key files you can use N different Pass Phrases - but then - you have to enter all of them, of course) while minimizing the terminal - dialog (i.e. when you use a single Pass Phrase for all N Private Key files - this Pass Phrase is queried only once). -
-
exec:/path/to/program
-- Here an external program is configured which is called at startup for each - encrypted Private Key file. It is called with two arguments (the first is - of the form ``
servername:portnumber
'', the second is either - ``RSA
'' or ``DSA
''), which indicate for which - server and algorithm it has to print the corresponding Pass Phrase to -stdout
. The intent is that this external program first runs - security checks to make sure that the system is not compromised by an - attacker, and only when these checks were passed successfully it provides - the Pass Phrase. -- Both these security checks, and the way the Pass Phrase is determined, can - be as complex as you like. Mod_ssl just defines the interface: an - executable program which provides the Pass Phrase on
stdout
. - Nothing more or less! So, if you're really paranoid about security, here - is your interface. Anything else has to be left as an exercise to the - administrator, because local security requirements are so different. -- The reuse-algorithm above is used here, too. In other words: The external - program is called only once per unique Pass Phrase. -
-Example: -
---SSLPassPhraseDialog exec:/usr/local/apache/sbin/pp-filter --
-SSLMutex directive
--
-
-- -- --
-- -- --
-- -Name: SSLMutex - -Description: Semaphore for internal mutual exclusion of operations - Syntax: SSLMutex
type- Default: SSLMutex none
- Context: server config - Override: Not applicable - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.1 -This configures the SSL engine's semaphore (aka. lock) which is used for mutual -exclusion of operations which have to be done in a synchronized way between the -pre-forked Apache server processes. This directive can only be used in the -global server context because it's only useful to have one global mutex. -
-The following Mutex types are available: -
-
-none
-- This is the default where no Mutex is used at all. Use it at your own - risk. But because currently the Mutex is mainly used for synchronizing - write access to the SSL Session Cache you can live without it as long - as you accept a sometimes garbled Session Cache. So it's not recommended - to leave this the default. Instead configure a real Mutex. -
-
file:/path/to/mutex
-- This is the portable and (under Unix) always provided Mutex variant where - a physical (lock-)file is used as the Mutex. Always use a local disk - filesystem for
/path/to/mutex
and never a file residing on a - NFS- or AFS-filesystem. Note: Internally, the Process ID (PID) of the - Apache parent process is automatically appended to -/path/to/mutex
to make it unique, so you don't have to worry - about conflicts yourself. Notice that this type of mutex is not available - under the Win32 environment. There you have to use the semaphore - mutex. --
sem
-- This is the most elegant but also most non-portable Mutex variant where a - SysV IPC Semaphore (under Unix) and a Windows Mutex (under Win32) is used - when possible. It is only available when the underlying platform - supports it. -
-Example: -
---SSLMutex file:/usr/local/apache/logs/ssl_mutex --
-SSLRandomSeed directive
+SSLCACertificateFile Directive
Description: File of concatenated PEM-encoded CA Certificates +for Client Auth Syntax: SSLCACertificateFile file-path Context: server config, virtual host Status: Extension Module: mod_ssl -
-
-- -- --
-- -- --
-- -Name: SSLRandomSeed - -Description: Pseudo Random Number Generator (PRNG) seeding source - Syntax: SSLRandomSeed
context source [bytes]- Default: none - Context: server config - Override: Not applicable - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.2 -This configures one or more sources for seeding the Pseudo Random Number -Generator (PRNG) in OpenSSL at startup time (context is -
startup
) and/or just before a new SSL connection is established -(context isconnect
). This directive can only be used -in the global server context because the PRNG is a global facility. --The following source variants are available: -
-
-builtin
-This is the always available builtin seeding source. It's usage - consumes minimum CPU cycles under runtime and hence can be always used - without drawbacks. The source used for seeding the PRNG contains of the - current time, the current process id and (when applicable) a randomly - choosen 1KB extract of the inter-process scoreboard structure of Apache. - The drawback is that this is not really a strong source and at startup - time (where the scoreboard is still not available) this source just - produces a few bytes of entropy. So you should always, at least for the - startup, use an additional seeding source. -
-
file:/path/to/source
-- This variant uses an external file
/path/to/source
as the - source for seeding the PRNG. When bytes is specified, only the - first bytes number of bytes of the file form the entropy (and - bytes is given to/path/to/source
as the first - argument). When bytes is not specified the whole file forms the - entropy (and0
is given to/path/to/source
as - the first argument). Use this especially at startup time, for instance - with an available/dev/random
and/or -/dev/urandom
devices (which usually exist on modern Unix - derivates like FreeBSD and Linux). -- But be careful: Usually
/dev/random
provides only as - much entropy data as it actually has, i.e. when you request 512 bytes of - entropy, but the device currently has only 100 bytes available two things - can happen: On some platforms you receive only the 100 bytes while on - other platforms the read blocks until enough bytes are available (which - can take a long time). Here using an existing/dev/urandom
is - better, because it never blocks and actually gives the amount of requested - data. The drawback is just that the quality of the received data may not - be the best. -- On some platforms like FreeBSD one can even control how the entropy is - actually generated, i.e. by which system interrupts. More details one can - find under rndcontrol(8) on those platforms. Alternatively, when - your system lacks such a random device, you can use tool - like EGD - (Entropy Gathering Daemon) and run it's client program with the -
exec:/path/to/program/
variant (see below) or use -egd:/path/to/egd-socket
(see below). --
exec:/path/to/program
-- This variant uses an external executable
/path/to/program
as - the source for seeding the PRNG. When bytes is specified, only the - first bytes number of bytes of itsstdout
contents - form the entropy. When bytes is not specified, the entirety of - the data produced onstdout
form the entropy. Use this only - at startup time when you need a very strong seeding with the help of an - external program (for instance as in the example above with the -truerand
utility you can find in the mod_ssl distribution - which is based on the AT&T truerand library). Using this in - the connection context slows down the server too dramatically, of course. - So usually you should avoid using external programs in that context. --
egd:/path/to/egd-socket
(Unix only) -- This variant uses the Unix domain socket of the - external Entropy Gathering Daemon (EGD) (see http://www.lothar.com/tech - /crypto/) to seed the PRNG. Use this if no random device exists - on your platform. -
-Example: -
---SSLRandomSeed startup builtin -SSLRandomSeed startup file:/dev/random -SSLRandomSeed startup file:/dev/urandom 1024 -SSLRandomSeed startup exec:/usr/local/bin/truerand 16 -SSLRandomSeed connect builtin -SSLRandomSeed connect file:/dev/random -SSLRandomSeed connect file:/dev/urandom 1024 --
-SSLSessionCache directive
--
-- -- --
-- -- --
-- -Name: SSLSessionCache - -Description: Type of the global/inter-process SSL Session Cache - Syntax: SSLSessionCache
type- Default: SSLSessionCache none
- Context: server config - Override: Not applicable - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.1 -This configures the storage type of the global/inter-process SSL Session -Cache. This cache is an optional facility which speeds up parallel request -processing. For requests to the same server process (via HTTP keep-alive), -OpenSSL already caches the SSL session information locally. But because modern -clients request inlined images and other data via parallel requests (usually -up to four parallel requests are common) those requests are served by -different pre-forked server processes. Here an inter-process cache -helps to avoid unneccessary session handshakes. -
-The following two storage types are currently supported: -
-
-none
-- This is the default and just disables the global/inter-process Session - Cache. There is no drawback in functionality, but a noticeable speed - penalty can be observed. -
-
dbm:/path/to/datafile
-- This makes use of a DBM hashfile on the local disk to synchronize the - local OpenSSL memory caches of the server processes. The slight increase - in I/O on the server results in a visible request speedup for your - clients, so this type of storage is generally recommended. -
-
shm:/path/to/datafile
[(
size)
] -- This makes use of a high-performance hash table (approx. size bytes - in size) inside a shared memory segment in RAM (established via -
/path/to/datafile
) to synchronize the local OpenSSL memory - caches of the server processes. This storage type is not available on all - platforms. See the mod_sslINSTALL
document for details on - how to build Apache+EAPI with shared memory support. --Examples: -
---SSLSessionCache dbm:/usr/local/apache/logs/ssl_gcache_data -SSLSessionCache shm:/usr/local/apache/logs/ssl_gcache_data(512000) --
-SSLSessionCacheTimeout directive
--
-- -- --
-- -- --
-- -Name: SSLSessionCacheTimeout - -Description: Number of seconds before an SSL session expires in the Session Cache - Syntax: SSLSessionCacheTimeout
seconds- Default: SSLSessionCacheTimeout 300
- Context: server config, virtual host - Override: Not applicable - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.0 -This directive sets the timeout in seconds for the information stored in the -global/inter-process SSL Session Cache and the OpenSSL internal memory cache. -It can be set as low as 15 for testing, but should be set to higher -values like 300 in real life. -
-Example: -
---SSLSessionCacheTimeout 600 --
-SSLEngine directive
--
-- -- --
-- -- --
-- -Name: SSLEngine - -Description: SSL Engine Operation Switch - Syntax: SSLEngine
on|off- Default: SSLEngine off
- Context: server config, virtual host - Override: Not applicable - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.1 -This directive toggles the usage of the SSL/TLS Protocol Engine. This is -usually used inside a <VirtualHost> section to enable SSL/TLS for a -particular virtual host. By default the SSL/TLS Protocol Engine is disabled -for both the main server and all configured virtual hosts. -
-Example: -
---<VirtualHost _default_:443> -SSLEngine on -... -</VirtualHost> --
-SSLProtocol directive
--
-- -- --
-- -- --
-- -Name: SSLProtocol - -Description: Configure usable SSL protocol flavors - Syntax: SSLProtocol
[+-]protocol ...- Default: SSLProtocol all
- Context: server config, virtual host - Override: Options - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.2 -This directive can be used to control the SSL protocol flavors mod_ssl should -use when establishing its server environment. Clients then can only connect -with one of the provided protocols. +This directive sets the all-in-one file where you can assemble the +Certificates of Certification Authorities (CA) whose clients you deal +with. These are used for Client Authentication. Such a file is simply the +concatenation of the various PEM-encoded Certificate files, in order of +preference. This can be used alternatively and/or additionally to +
+SSLCACertificatePath
.+
Example
+SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle-client.crt +
SSLCACertificatePath Directive
Description: Directory of PEM-encoded CA Certificates for +Client Auth Syntax: SSLCACertificatePath directory-path Context: server config, virtual host Status: Extension Module: mod_ssl -The available (case-insensitive) protocols are: -
-
SSLv2
-- This is the Secure Sockets Layer (SSL) protocol, version 2.0. It is the - original SSL protocol as designed by Netscape Corporation. +This directive sets the directory where you keep the Certificates of +Certification Authorities (CAs) whose clients you deal with. These are used to +verify the client certificate on Client Authentication.
-
SSLv3
-- This is the Secure Sockets Layer (SSL) protocol, version 3.0. It is the - successor to SSLv2 and the currently (as of February 1999) de-facto - standardized SSL protocol from Netscape Corporation. It's supported by - almost all popular browsers. +The files in this directory have to be PEM-encoded and are accessed through +hash filenames. So usually you can't just place the Certificate files +there: you also have to create symbolic links named +hash-value
+.N
. And you should always make sure this directory +contains the appropriate symbolic links. Use theMakefile
which +comes with mod_ssl to accomplish this task.+
Example
+SSLCACertificatePath /usr/local/apache/conf/ssl.crt/ +
SSLCARevocationFile Directive
Description: File of concatenated PEM-encoded CA CRLs for +Client Auth Syntax: SSLCARevocationFile file-path Context: server config, virtual host Status: Extension Module: mod_ssl + +This directive sets the all-in-one file where you can +assemble the Certificate Revocation Lists (CRL) of Certification +Authorities (CA) whose clients you deal with. These are used +for Client Authentication. Such a file is simply the concatenation of +the various PEM-encoded CRL files, in order of preference. This can be +used alternatively and/or additionally to
+SSLCARevocationPath
.+
Example
+SSLCARevocationFile /usr/local/apache/conf/ssl.crl/ca-bundle-client.crl +
SSLCARevocationPath Directive
Description: Directory of PEM-encoded CA CRLs for +Client Auth Syntax: SSLCARevocationPath directory-path Context: server config, virtual host Status: Extension Module: mod_ssl -
TLSv1
-- This is the Transport Layer Security (TLS) protocol, version 1.0. It is the - successor to SSLv3 and currently (as of February 1999) still under - construction by the Internet Engineering Task Force (IETF). It's still - not supported by any popular browsers. +This directive sets the directory where you keep the Certificate Revocation +Lists (CRL) of Certification Authorities (CAs) whose clients you deal with. +These are used to revoke the client certificate on Client Authentication.
-
All
-- This is a shortcut for ``
++SSLv2 +SSLv3 +TLSv1
'' and a - convinient way for enabling all protocols except one when used in - combination with the minus sign on a protocol as the example above shows. - +The files in this directory have to be PEM-encoded and are accessed through +hash filenames. So usually you have not only to place the CRL files there. +Additionally you have to create symbolic links named +hash-value.rN
. And you should always make sure this directory +contains the appropriate symbolic links. Use theMakefile
which +comes withmod_ssl
to accomplish this task.+
Example
+SSLCARevocationPath /usr/local/apache/conf/ssl.crl/ +
SSLCertificateChainFile Directive
Description: File of PEM-encoded Server CA Certificates Syntax: SSLCertificateChainFile file-path Context: server config, virtual host Status: Extension Module: mod_ssl -Example: -
---# enable SSLv3 and TLSv1, but not SSLv2 -SSLProtocol all -SSLv2 --
+This directive sets the optional all-in-one file where you can +assemble the certificates of Certification Authorities (CA) which form the +certificate chain of the server certificate. This starts with the issuing CA +certificate of of the server certificate and can range up to the root CA +certificate. Such a file is simply the concatenation of the various +PEM-encoded CA Certificate files, usually in certificate chain order. ++This should be used alternatively and/or additionally to
SSLCACertificatePath
for explicitly +constructing the server certificate chain which is sent to the browser +in addition to the server certificate. It is especially useful to +avoid conflicts with CA certificates when using client +authentication. Because although placing a CA certificate of the +server certificate chain intoSSLCACertificatePath
has the same effect +for the certificate chain construction, it has the side-effect that +client certificates issued by this same CA certificate are also +accepted on client authentication. That's usually not one expect.SSLCipherSuite directive
--
+But be careful: Providing the certificate chain works only if you are using a +single (either RSA or DSA) based server certificate. If you are +using a coupled RSA+DSA certificate pair, this will work only if actually both +certificates use the same certificate chain. Else the browsers will be +confused in this situation. +- -- --
-- -- --
-- -Name: SSLCipherSuite - -Description: Cipher Suite available for negotiation in SSL handshake - Syntax: SSLCipherSuite
cipher-spec- Default: SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
- Context: server config, virtual host, directory, .htaccess - Override: AuthConfig - Status: Extension - Module: mod_ssl - Compatibility: mod_ssl 2.1 +
Example
+SSLCertificateChainFile /usr/local/apache/conf/ssl.crt/ca.crt +
SSLCertificateFile Directive
Description: Server PEM-encoded X.509 Certificate file Syntax: SSLCertificateFile file-path Context: server config, virtual host Status: Extension Module: mod_ssl + +This directive points to the PEM-encoded Certificate file for the server and +optionally also to the corresponding RSA or DSA Private Key file for it +(contained in the same file). If the contained Private Key is encrypted the +Pass Phrase dialog is forced at startup time. This directive can be used up to +two times (referencing different filenames) when both a RSA and a DSA based +server certificate is used in parallel.
++
Example
+SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt +
SSLCertificateKeyFile Directive
Description: Server PEM-encoded Private Key file Syntax: SSLCertificateKeyFile file-path Context: server config, virtual host Status: Extension Module: mod_ssl + +This directive points to the PEM-encoded Private Key file for the +server. If the Private Key is not combined with the Certificate in the +
+SSLCertificateFile
, use this additional directive to +point to the file with the stand-alone Private Key. When +SSLCertificateFile
is used and the file +contains both the Certificate and the Private Key this directive need +not be used. But we strongly discourage this practice. Instead we +recommend you to separate the Certificate and the Private Key. If the +contained Private Key is encrypted, the Pass Phrase dialog is forced +at startup time. This directive can be used up to two times +(referencing different filenames) when both a RSA and a DSA based +private key is used in parallel.+
Example
+SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key +
SSLCipherSuite Directive
Description: Cipher Suite available for negotiation in SSL +handshake Syntax: SSLCipherSuite cipher-spec Default: SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
Context: server config, virtual host, directory, .htaccess Override: AuthConfig Status: Extension Module: mod_ssl This complex directive uses a colon-separated cipher-spec string consisting of OpenSSL cipher specifications to configure the Cipher Suite the @@ -870,29 +214,30 @@ directive can be used both in per-server and per-directory context. In per-server context it applies to the standard SSL handshake when a connection is established. In per-directory context it forces a SSL renegotation with the reconfigured Cipher Suite after the HTTP request was read but before the HTTP -response is sent. +response is sent.
An SSL cipher specification in cipher-spec is composed of 4 major -attributes plus a few extra minor ones: +attributes plus a few extra minor ones:
-An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1 +
- Key Exchange Algorithm:
RSA or Diffie-Hellman variants. -+
- Authentication Algorithm:
RSA, Diffie-Hellman, DSS or none. -+
- Cipher/Encryption Algorithm:
DES, Triple-DES, RC4, RC2, IDEA or none. -+
- MAC Digest Algorithm:
MD5, SHA or SHA1. +An SSL cipher can also be an export cipher and is either a SSLv2 or SSLv3/TLSv1 cipher (here TLSv1 is equivalent to SSLv3). To specify which ciphers to use, one can either specify all the Ciphers, one at a time, or use aliases to specify the preference and order for the ciphers (see Table -1). -
+1).
+