Layer7 API Management

Expand all | Collapse all

How to Host a Website using Reverse Proxy

Jump to Best Answer
  • 1.  How to Host a Website using Reverse Proxy

    Posted 07-11-2018 02:13 PM
      |   view attached

    Hi Team,

     

    While Implementing reverse proxy I am facing below Issue as shared in the screenshot.

     

     

    I have just published a reverse proxy policy and added my local portal URL, but while executing the policy I am not getting my fully functional portal page. 

     



  • 2.  Re: How to Host a Website using Reverse Proxy
    Best Answer

    Posted 07-11-2018 08:59 PM

    Seems many problems,

    1. why disable set context variable ${requestHost} -- you will not be able to translate request host to the target host

    2. /portal is not correct, /portal* or /portal/*, otherwise the gateway only accept /portal uri

    3. since you add /portal in gateway uri, you need to remove it before route to target server, and add it back after get response from target server, ie. the default template is only good for /* (then the gateway will be a dedicate reverse proxy), you need to manually handle the uri you add.

     

    Here is how reverse proxy work, we translate the gateway host to target host (using regex assertion) in anywhere of the request message (query, headers, payload, cookies, etc.), then call target server with translated request message, after get response, we translate all the target host in anywhere of the response message back to gateway host.



  • 3.  Re: How to Host a Website using Reverse Proxy

    Posted 07-14-2018 01:05 AM

    Hi Mark,

     

    Thank you for the help!!

     

    Now I am able to host a website on the gateway with the corrections suggested by you.

     

     

    Thanks,