Httpd ProxyPass: Difference between revisions
Line 68: | Line 68: | ||
=Connection Pool Configuration= | =Connection Pool Configuration= | ||
For concepts, see: | |||
<blockquote style="background-color: #f9f9f9; border: solid thin lightgrey;"> | |||
:[[Httpd_ProxyPass#Connection_Pool_Configuration|ProxyPass Connection Pool Configuration]] | |||
</blockquote> |
Revision as of 21:32, 1 January 2017
External
Internal
Overview
The ProxyPass directive maps remote servers into the local server URL-space, by creating a worker that handles the request associated with the declared remote URL. A more flexible alternative is the use of RewriteRule with the [P] flag.
For ProxyPass-related mod_proxy concepts see:
It can be used inside a <Location> or <LocationMatch> directive, see Example below. <ProxyPass> is not supported within <Directory> and <Files> containers.
Syntax
ProxyPass [path] !|url [key=value ...]
The path is the name of a local virtual path.
The url is a partial URL for the origin server. It cannot include a query string.
If path ends with a trailing "/", the url should also end with a trailing "/", and vice-versa, otherwise the resulting requests to the backend may miss some of the needed slashes and produce unwanted results.
Example
ProxyPass "/something" "http://example.com/something-else
Alternative using <Location>:
<Location "/something"> ProxyPass "http://example.com/something-else" </Location>
Order
ProxyPass and ProxyPassMatch rules are checked in the order in which they were specified in the configuration file, and the first rule match wins. For the same reason, exclusions must come before the general ProxyPass directives.
Also see:
Preventing a Sub-Directory to Be Proxied
ProxyPass "/something/do-not-proxy" "!" ProxyPass "/something" "http://example.com"
Connection Pool Configuration
For concepts, see: