Publish Reverse Web Proxy

You can configure the  to behave as a reverse-web proxy, allowing you to manipulate the request and/or response headers, cookies, and content:
gateway91
You can configure the
API Gateway
 to behave as a reverse-web proxy, allowing you to manipulate the request and/or response headers, cookies, and content:
  • To proxy only a single web application at a time, use the Publish Reverse Web Proxy Wizard to generate the appropriate service policy.
  • To proxy multiple web applications, do the following:
    1. Run the Publish Reverse Web Proxy Wizard once for each web application to be proxied. This will create one service per web proxy.
    2. Configure a global policy or configure multiple listen ports.
If you intend to analyze the web app response, ensure that the Content-Type of the response is defined in the cluster property.
Contents
Choose a task to perform:
For information on how to...
See
Publish a reverse proxy web service
Delete a reverse proxy web service
Change the routing URI for a reverse proxy web service
Using a Global Policy to Proxy Multiple Web Applications
One way to proxy multiple web applications is to use a global policy after creating a web proxy service with the Publish Reverse Web Proxy Wizard. This global policy will resolve a proxy service based on the host URL of the request, which is accessed through the ${request.url.host} context variable. For example:
If request.url.host = WebAppProxy1 then resolve to service WebAppProxyService1, otherwise if request.url.host = WebAppProxy2 then resolve to service WebAppProxyService2.
The following is a sample global policy for multiple reverse web proxy service resolution. For more information about global policies, see Global Policy Fragments.
<?xml version="1.0" encoding="UTF-8"?> <wsp:Policy xmlns:L7p="http://www.layer7tech.com/ws/policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"> <wsp:All wsp:Usage="Required"> <wsp:OneOrMore wsp:Usage="Required"> <wsp:All wsp:Usage="Required"> <L7p:ComparisonAssertion> <L7p:CaseSensitive booleanValue="false"/> <L7p:Expression1 stringValue="${request.url.host}"/> <L7p:Expression2 stringValue="sharepointProxy2010"/> <L7p:Predicates predicates="included"> <L7p:item binary="included"> <L7p:CaseSensitive booleanValue="false"/> <L7p:RightValue stringValue="sharepointProxy2010"/> </L7p:item> </L7p:Predicates> </L7p:ComparisonAssertion> <L7p:ResolveService> <L7p:Uri stringValue="/2010"/> </L7p:ResolveService> </wsp:All> <wsp:All wsp:Usage="Required"> <L7p:ComparisonAssertion> <L7p:CaseSensitive booleanValue="false"/> <L7p:Expression1 stringValue="${request.url.host}"/> <L7p:Expression2 stringValue="sharepointProxy2013"/> <L7p:Predicates predicates="included"> <L7p:item binary="included"> <L7p:CaseSensitive booleanValue="false"/> <L7p:RightValue stringValue="sharepointProxy2013"/> </L7p:item> </L7p:Predicates> </L7p:ComparisonAssertion> <L7p:ResolveService> <L7p:Uri stringValue="/2013"/> </L7p:ResolveService> </wsp:All> <L7p:TrueAssertion/> </wsp:OneOrMore> </wsp:All> </wsp:Policy>
Using Multiple Listen Ports to Proxy Multiple Web Applications
Another method to proxy multiple web applications is to configure multiple listen ports after creating a web proxy service with the Publish Reverse Web Proxy Wizard. Each listen port will resolve to specific proxy services. For example, all HTTP requests on port 8888 resolve to WebappProxyService1, while all HTTP requests on port 9999 resolve to WebappProxyService2.
To configure multiple listen ports
:
  1. Configure a listen port for the first port. 
    Basic Settings Tab
     image2014-9-4 10:44:49.png
     
    Advanced tab
     
    image2014-9-4 10:45:26.png
     
  2. Configure a listen port for the second port in a similar fashion.
    For information on configuring listen ports, see Manage Listen Ports.