trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iga...@apache.org
Subject svn commit: r1101407 - /trafficserver/site/branches/ats-cms/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.mdtext
Date Tue, 10 May 2011 11:20:42 GMT
Author: igalic
Date: Tue May 10 11:20:42 2011
New Revision: 1101407

URL: http://svn.apache.org/viewvc?rev=1101407&view=rev
Log:
Fix up reverse proxy doc to remove tedious redundancies

Modified:
    trafficserver/site/branches/ats-cms/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.mdtext

Modified: trafficserver/site/branches/ats-cms/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.mdtext
URL: http://svn.apache.org/viewvc/trafficserver/site/branches/ats-cms/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.mdtext?rev=1101407&r1=1101406&r2=1101407&view=diff
==============================================================================
--- trafficserver/site/branches/ats-cms/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.mdtext
(original)
+++ trafficserver/site/branches/ats-cms/content/docs/trunk/admin/reverse-proxy-http-redirects/index.en.mdtext
Tue May 10 11:20:42 2011
@@ -50,7 +50,7 @@ You can use Traffic Server in reverse pr
 * Deliver content efficiently in geographically distant areas
 * Provide security for origin servers that contain sensitive information 
 
-#### Offloading Heavily-Used Origin Servers  #### {#OffloadingHeavily-UsedOriginServers}
+#### Offloading Heavily-Used Origin Servers  #### {#OffloadingHeavilyUsedOriginServers}
 
 Traffic Server can absorb requests to the main origin server and improve the 
 speed & quality of web serving by reducing load and hot spots on backup origin 
@@ -60,15 +60,10 @@ as backup servers. In fact, a single Tra
 origin server for multiple backup origin servers, as shown in the figure below. 
  
 
-![](images/revproxy.jpg)
+![Traffic Server as reverse proxy for a pair of origin servers](/images/admin/revproxy.jpg)
 
-> 
->   
-> 
-> _**Traffic Server as reverse proxy for a pair of origin servers **_
-> 
 
-#### Delivering Content in Geographically-Dispersed Areas  #### {#DeliveringContentinGeographically-DispersedAreas}
+#### Delivering Content in Geographically-Dispersed Areas  #### {#DeliveringContentinGeographicallyDispersedAreas}
 
 Traffic Server can be used in reverse proxy mode to accelerate origin servers 
 that provide content to areas not located within close geographical proximity. 
@@ -115,13 +110,8 @@ In reverse proxy mode, Traffic Server se
 server. The figure below illustrates how Traffic Server in reverse proxy mode 
 serves an HTTP request from a client browser. 
 
-![](images/httprvs.jpg)
+![HTTP reverse proxy](/images/admin/httprvs.jpg)
 
-> 
->   
-> 
-> _**HTTP reverse proxy **_
-> 
 
 The figure above demonstrates the following steps: 
 
@@ -146,19 +136,23 @@ as an origin server rather than a proxy 
 server requests and not proxy requests. Therefore, to satisfy proxy requests, 
 Traffic Server must construct a proxy request from the server request. 
 
-In HTTP, proxy requests specify the entire URL whereas server requests specify only the path.
A server request might look like this:  
-`GET /index.html HTTP/1.0 Host: real.dianes_books.com`  
-  
-However, the corresponding proxy request would look like this:   
-`GET http://real.dianes_books.com/index.html HTTP/1.0 Host: real.dianes_books.com`
+In HTTP, proxy requests specify the entire URL whereas server requests specify only the path.
A server request might look like this:
 
-Traffic Server can construct a proxy request from a server request by using the server information
in the host header. However, the correct proxy request must contain the hostname of the origin
server, not the advertised hostname that name servers associate to Traffic Server. The advertised
hostname is the name that appears in the host header; for the origin server `real.dianes_books.com`,
the server request and host header would be:  
-`GET /index.html HTTP/1.0 Host: www.dianes_books.com`
+    GET /index.html HTTP/1.0 Host: real.dianes-books.com
 
- And the correct proxy request should be   
-`GET http://real.dianes_books.com/index.html HTTP/1.0 Host: real.dianes_books.com`   
+However, the corresponding proxy request would look like this
 
-To translate `www.dianes_books.com` to `real.dianes_books.com`, Traffic Server 
+    GET http://real.dianes-books.com/index.html HTTP/1.0 Host: real.dianes-books.com
+
+Traffic Server can construct a proxy request from a server request by using the server information
in the host header. However, the correct proxy request must contain the hostname of the origin
server, not the advertised hostname that name servers associate to Traffic Server. The advertised
hostname is the name that appears in the host header; for the origin server `real.dianes-books.com`,
the server request and host header would be:
+
+    GET /index.html HTTP/1.0 Host: www.dianes-books.com
+
+ And the correct proxy request should be
+
+     GET http://real.dianes-books.com/index.html HTTP/1.0 Host: real.dianes-books.com
+
+To translate `www.dianes-books.com` to `real.dianes-books.com`, Traffic Server 
 needs a set of URL rewriting rules (mapping rules). Mapping rules are described 
 in [Using Mapping Rules for HTTP Requests](#UsingMappingRulesHTTPRequests). 
 
@@ -211,24 +205,16 @@ stores mapping rules in the `remap.confi
 
 ##### To create mapping rules:  ##### {#createmappingrules}
 
-1. In a text editor, open the `remap.config` file located in the Traffic Server `config`
directory. 
-2. Enter your map and reverse-map rules (refer to [remap.config](files.htm#remap.config)).

-3. Save and close the `remap.config` file. 
-4. Navigate to the Traffic Server `bin` directory. 
+1. In the [`remap.config`](../configuration-files/remap.config)
+2. Enter your map and reverse-map rules
 5. Run the command `traffic_line -x` to apply the configuration changes.
 
 ### Enabling HTTP Reverse Proxy  ### {#EnablingHTTPReverseProxy}
 
 To enable HTTP reverse proxy, follow the steps below.
 
-1. In a text editor, open the `records.config` file located in the `config` directory. 
-2. Edit the following variable:
-3. **Variable** **Description** 
-`_proxy.config.reverse_proxy.enabled_`
-:   Set this variable to 1 to enable HTTP reverse proxy mode. 
-
-4. Save and close the `records.config` file. 
-5. Navigate to the Traffic Server `bin` directory. 
+1. In the [`records.config`](../configuration-files/records.config)
+2. Edit the variable [_`proxy.config.reverse_proxy.enabled`_](../configuration-files/records.config#proxy.config.reverse_proxy.enabled)
 6. Run the command `traffic_line -x` to apply the configuration changes. 
 
 ### Setting Optional HTTP Reverse Proxy Options  ### {#SettingOptionalHTTPReverseProxyOptions}
@@ -242,20 +228,10 @@ you to: 
 
 ##### To set optional HTTP reverse proxy options:  ##### {#setoptionalHTTPreverseproxyoptions}
 
-1. In a text editor, open the `records.config` file located in the `config` directory. 
-2. Edit the following variables:
-3. **Variable** **Description** 
-`_proxy.config.url_remap.pristine_host_hdr_`
-:   Set this variable to 1 to retain the client host header in the request.   
-		 Set this variable to 0 (zero) if you want Traffic Server to translate the client host
header.
-`_proxy.config.url_remap.remap_required_`
-:   Set this variable to 1 if you want Traffic Server to serve requests only to the origin
servers listed in the mapping rules of the `remap.config` file.   
-		 Set this variable to 0 (zero) if you want Traffic Server to serve requests to all origin
servers.
-`_proxy.config.header.parse.no_host_url_redirect_`
-:   Enter the URL to which to redirect requests with no host headers.
-
-4. Save and close the `records.config` file. 
-5. Navigate to the Traffic Server `bin` directory. 
+1. In the [`records.config`](../configuration-files/records.config)
+2. Edit the variable [_`proxy.config.url_remap.pristine_host_hdr`_](../configuration-files/records.config#proxy.config.url_remap.pristine_host_hdr)
+2. Edit the variable [_`proxy.config.url_remap.remap_required`_](../configuration-files/records.config#proxy.config.url_remap.remap_required)
+2. Edit the variable [_`proxy.config.header.parse.no_host_url_reedirect`_](../configuration-files/records.config#proxy.config.header.parse.no_host_url_redirect)
 6. Run the command `traffic_line -x` to apply the configuration changes. 
 
 ## Redirecting HTTP Requests ## {#RedirectingHTTPRequests}
@@ -268,67 +244,21 @@ for `www.ultraseek.com` go directly to `
 
 You can configure Traffic Server to perform permanent or temporary redirects. 
 **Permanent redirects** notify the browser of the URL change (by returning 
-the HTTP status code `**301**`) so that the browser can update bookmarks. **Temporary 
-redirects **notify the browser of the URL change for the current request only 
-(by returning the HTTP status code **`307`**).
+the HTTP status code **`301`**) so that the browser can update bookmarks. **Temporary 
+redirects** notify the browser of the URL change for the current request only 
+(by returning the HTTP status code **`307`** ).
 
 ##### To set redirect rules:  ##### {#setredirectrules}
 
-1. In a text editor, open the `remap.config` file located in the Traffic Server `config`
directory. 
-2. Enter a mapping rule for each redirect you want to set. Each mapping rule must be on a
separate line and must consist of three space-delimited fields: `type`, `target`, and `replacement`.
The following table describes the format for each field.  
-**Field** **Description** 
-`type`
-:   Enter either one of the following:   
-		   `redirect`—redirects HTTP requests permanently without having to contact
the origin server.   
-		   `redirect_temporary`—redirects HTTP requests temporarily without having to
contact the origin server.
-`target`
-:   Enter the origin or from URL. You can enter up to four components:   
-		   _`scheme://host:port/path_prefix`_
-`replacement`
-:   Enter the destination or to URL. You can enter up to four components:   
-		   _`scheme://host:port/path_prefix`_
- The following permanently redirects all HTTP requests for `www.server1.com` to `www.server2.com`
:  
-`redirect http://www.server1.com http://www.server2.com `  
-  
-
-3. Save and close the `remap.config` file. 
-4. Navigate to the Traffic Server `bin` directory. 
+1. In the [`remap.config`](../configuration-files/remap.config)
+2. Enter a mapping rule for each redirect you want to set.
 5. Run the command `traffic_line -x` to apply the configuration changes.
 
-      
-
-   
-
-   
 
-         
+**Example**
 
-* [Overview](intro.htm)
-* [Getting Started](getstart.htm)
-* [HTTP Proxy Caching ](http.htm)
-* [Explicit Proxy Caching](explicit.htm)
-* [Reverse Proxy and HTTP Redirects](reverse.htm)
-* [Hierarchical Caching](hier.htm)
-* [Configuring the Cache](cache.htm)
-* [Monitoring Traffic](monitor.htm)
-* [Configuring Traffic Server](configure.htm)
-* [Security Options](secure.htm)
-* [Working with Log Files](log.htm)
-* [Traffic Line Commands](cli.htm)
-* [Event Logging Formats](logfmts.htm)
-* [Configuration Files](files.htm) 
-* [Traffic Server Error Messages](errors.htm)
-* [FAQ and Troubleshooting Tips](trouble.htm)
-* [Traffic Server 管理员指南](ts_admin_chinese.pdf) (PDF)
-
-   
-
-   
-
- Copyright © 2011 [The Apache Software Foundation](http://www.apache.org/). 
-Licensed under the [Apache License](http://www.apache.org/licenses/), Version 
-2.0. Apache Traffic Server, Apache, the Apache Traffic Server logo, and the 
-Apache feather logo are trademarks of The Apache Software Foundation.
+The following permanently redirects all HTTP requests for `www.server1.com` to `www.server2.com`:
 
+    redirect http://www.server1.com http://www.server2.com
 
 



Mime
View raw message