From: Daniel Gruno A typical configuration protecting a server serving static content
might be as follows: Master switch to enable or disable policies for a given URL space.
-
-
-
- # content type must be present and valid, but can be anything
- PolicyType enforce */*
-
- # reject if no explicitly declared content length
- PolicyLength enforce
-
- # covered by the policy length filter
- PolicyKeepalive ignore
-
- # reject if User-Agent appears within Vary headers
- PolicyVary enforce User-Agent
-
- # we want to enforce validation
- PolicyValidation enforce
-
- # non-functional conditional responses should be rejected
- PolicyConditional enforce
-
- # no-cache responses should be rejected
- PolicyNocache enforce
-
- # maxage must be at least a day
- PolicyMaxage enforce 86400
-
- # request version can be anything
- PolicyVersion ignore HTTP/1.1
-
-
- # suppress policy protection for server-status
- <Location /server-status>
-
-
-
- <Location />
-
-
-
- # suppress policy protection for server-status
- <Location /server-status>
-
-
+
Content-Length header will be rejected.
chunked will be rejected.
This will create a worker associated with the origin server URL
http://backend.example.com and using the given timeout
values. When used in a forward proxy, workers are usually defined
via the
or alternatively using
Using explicitly configured workers in the forward mode is not very common, because forward proxies usually communicate with many @@ -225,10 +225,10 @@
The URL identifying a direct worker is the URL of its origin server including any path components given:
-This example defines two different workers, each using a separate connection pool and configuration.
@@ -238,10 +238,10 @@ the URL of some worker is a leading substring of the URL of another worker defined later in the configuration file. In the following example -the second worker isn't actually created. Instead the first worker is used. The benefit is, that there is only one connection pool, @@ -288,13 +288,11 @@ module="mod_proxy" type="section">Proxy control block as in the following example:
-For more information on access control directives, see
These are the force-proxy-request-1.0 and
proxy-nokeepalive notes.
yournetwork.example.com to access content via your proxy
server:
- The following example will process all files in the foo
directory of example.com through the INCLUDES
filter when they are sent through the proxy server:
In the last example, the proxy will forward FTP requests, encapsulated
@@ -697,30 +691,28 @@ expressions
Keep in mind that the same parameter key can have a different meaning @@ -757,13 +749,11 @@ expressions
Suppose the local server has address http://example.com/;
then
will cause a local request for
http://example.com/mirror/foo/bar to be internally converted
@@ -774,9 +764,9 @@ expressions
the below syntax is that it allows for dynamic control via the
Balancer Manager interface:
If the first argument ends with a trailing /, the second @@ -789,23 +779,19 @@ expressions
The ! directive is useful in situations where you don't want
to reverse-proxy a subdirectory, e.g.
will proxy all requests to /mirror/foo to
backend.example.com except requests made to
@@ -1116,33 +1102,29 @@ expressions
A sample balancer setup
-Setting up a hot-standby, that will only be used if no other members are available
-Normally, mod_proxy will canonicalise ProxyPassed URLs. But this may be incompatible with some backends, particularly those @@ -1204,9 +1186,9 @@ expressions
Suppose the local server has address http://example.com/;
then
will cause a local request for
http://example.com/foo/bar.gif to be internally converted
@@ -1215,15 +1197,15 @@ expressions
The URL argument must be parsable as a URL before regexp substitutions (as well as after). This limits the matches you can use. For instance, if we had used
-in our previous example, it would fail with a syntax error at server startup. This is a bug (PR 46665 in the ASF bugzilla), and the workaround is to reformulate the match:
-The ! directive is useful in situations where you don't want
to reverse-proxy a subdirectory.
For example, suppose the local server has address
http://example.com/; then
will not only cause a local request for the
http://example.com/mirror/foo/bar to be internally converted
@@ -1369,9 +1351,9 @@ reverse proxy. This directive rewrites the path string in
In the example given with
will rewrite a cookie with backend path / (or
/example or, in fact, anything) to /mirror/foo/.
@@ -1398,7 +1380,9 @@ proxied
well. That may slow down the startup time of the server.
Note that example would also be sufficient to match any
@@ -1408,9 +1392,9 @@ proxied
Note also that
-blocks connections to all sites.
@@ -1433,7 +1417,9 @@ connections be used.Note that setting
The host arguments to the
ajp:// prefix:
Balancers may also be used:
Note that usually no
@@ -85,8 +87,10 @@
original host URL (not the backend ajp:// URL), for
example:
However, it is usually better to deploy the application on the backend server at the same path as the proxy rather than to take this approach. diff --git a/docs/manual/mod/mod_proxy_balancer.xml b/docs/manual/mod/mod_proxy_balancer.xml index 3520c5bd013..f8f097ec6a2 100644 --- a/docs/manual/mod/mod_proxy_balancer.xml +++ b/docs/manual/mod/mod_proxy_balancer.xml @@ -91,31 +91,30 @@ load balancing between two back-end servers:
-Another example of how to provide load balancing with stickyness
using
To enable load balancer management for browsers from the example.com
domain add this code to your httpd.conf
configuration file
You can now access load balancer manager by using a Web browser
to access the page
diff --git a/docs/manual/mod/mod_proxy_fcgi.xml b/docs/manual/mod/mod_proxy_fcgi.xml
index 5de04b121ef..ca32557e8c8 100644
--- a/docs/manual/mod/mod_proxy_fcgi.xml
+++ b/docs/manual/mod/mod_proxy_fcgi.xml
@@ -61,7 +61,9 @@
enable
This application should be able to handle multiple concurrent @@ -76,7 +78,9 @@ the following example:
The balanced gateway needs
Alternatively you may prefer to default everything to binary:
ForceType application/octet-stream+
The balanced gateway needs