Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


2.3.106 ProxyPassReverse

ProxyPassReverse changes the URL in the Location header received from the backend server.

Description

ProxyPassReverse changes the URL in the Location header in the redirect response from the backend server, when a reverse proxy is used. ProxyPassReverse changes the Location header to the value specified in this directive to make the request redirected from the web browser to a request that goes through a reverse proxy.

Note that the following modules must be built-in to use a reverse proxy:

Syntax

ProxyPassReverse path_name URL

Specifiable values

path_name

Specify the path name of the reverse proxy that is the destination of the redirect request in the URL beginning with a forward slash (/).

URL

Specify the URL of the backend server in the Location header that is the target to be changed in a format that includes http://IP_address_or_host_name[:port_number]/.

An IPv6 address or a host name that corresponds to an IPv6 address can be specified in the URL also. Be careful when specifying the values, because the IPv6 addresses have various notation methods. When the notation of the IPv6 address does not match with the specified value, the directive is invalid. When specifying the IPv6 address, check the notation of the IPv6 address that is included in the Location header value of the response from the backend server.

When using this value in the load balancer configuration that uses mod_proxy_balancer, the URL (balancer://cluster_name/) of the ProxyPass directive can be specified. When this is specified, the URL specified in the corresponding BalancerMember directive becomes the actual target URL to be changed. Usually, the BalancerMember directives are specified more than once so that all URLs become the targets to be changed.

Locations where it can be written

httpsd.conf and <VirtualHost>

Example

ProxyPass /examples/ balancer://cluster1/
ProxyPassReverse /examples/ balancer://cluster1/
<Proxy balancer://cluster1/>
        BalancerMember http://IP_address_A/examples/
        BalancerMember http://IP_address_B/examples/
</Proxy>

The URL becomes the target to be changed when the Location header from the backend server includes http://IP_address_A/examples/ or http://IP_address_B/examples/.