Httpd ProxyPass: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
Line 18: | Line 18: | ||
:[[Httpd_mod_proxy_Concepts#The_ProxyPass_Directive|ProxyPass Concepts]] | :[[Httpd_mod_proxy_Concepts#The_ProxyPass_Directive|ProxyPass Concepts]] | ||
</blockquote> | </blockquote> | ||
<ProxyPass> is not supported within <Directory> and <Files> containers. | |||
=Syntax= | =Syntax= |
Revision as of 03:57, 23 December 2016
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:
<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.
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.
Also see: