HP Cache Server Appliance Administrator Guide

38
Chapter 5 Reverse Proxy and HTTP Redirects
The following example shows a map rule that translates all requests for www.x.com to the origin server
server.hoster.com:
map http://www.x.com/ http://server.hoster.com
For more examples of mapping rules, refer to remap.config‚ on page 212.
4. Save and close the
remap.config file.
5. Run the following command to apply the configuration changes.
traffic_line -x
Setting HTTP reverse proxy options
In addition to mapping rules (described in Using mapping rules on page 36), Traffic Server provides several
configuration options for reverse proxy that let you:
Enable and disable HTTP reverse proxy mode
Configure Traffic Server to retain the client host header information in a request during translation
Configure Traffic Server to serve requests to the origin servers listed in the mapping rules only (requests
from origin servers not listed in the mapping rules are not served)
Specify an alternate URL where incoming requests from older clients that do not provide Host headers are
directed
You can set reverse proxy configuration options from Traffic Manager or by editing a configuration file
manually. Both procedures are provided below.
To set reverse proxy options from Traffic Manager:
1. Access Traffic Manager from your browser (refer to Accessing Traffic Manager‚ on page 8).
2. On the Configure tab, click the Routing button.
3. Scroll to the Reverse Proxy section of the Routing page.
4. Select the Reverse Proxy: On button to enable HTTP reverse proxy mode.
Select the Reverse Proxy: Off button to disable HTTP reverse proxy mode.
5. Select the Retain Client Host Header: On button if you want to retain the client host header in a request
(Traffic Server will not translate the client host header).
6. In the Mapping/Redirection section, select the Serve Mapped Hosts Only:On button if you want Traffic
Server to serve requests only from the origin servers listed in the mapping rules. This option provides
added security for your Traffic Server system.
7. In the URL to redirect requests without Host header field, enter an alternate URL to which incoming
requests from older clients that do not provide a host header are directed.
8. Click the Make These Changes button.
To set reverse proxy options manually:
1. Telnet into the HP web cache appliance and select Shell Access as described in Overview of Access
Methods‚ on page 7.
2. Open the
records.config file located in the Traffic Server’s config directory with Vi.