locked
Reverse Proxy problem RRS feed

  • Question

  • User633026423 posted

    I have configure a reverse proxy in my test web server and do a rewrite rule to app server. However, when I key in my web server hostname it will be show as the app server name not the reverse proxy name. Is there some setting that i need to change, because due to restriction I will not be able to launch the URL using the App Server name.

    Thanks

    Wednesday, March 31, 2021 2:07 AM

All replies

  • User1065476709 posted

    Hi A.T,

    when I key in my web server hostname it will be show as the app server name not the reverse proxy name.

    Can you show me how did you key in the web service hostname? 

    Best regards,

    Sam

    Friday, April 2, 2021 5:44 AM
  • User633026423 posted

    Hi Sam,

    When I enter the reverse proxy URL address , when I logout from the page it will not show reverse proxy url it show the app server that I rewrite to. Any ideas and changes I can make?

    Monday, April 5, 2021 4:09 AM
  • User1065476709 posted

    Hi A.T,

    You can clear the cache and try again.

    If you still can’t solve the problem, please show me how you configure the reverse proxy.

    Best regards,

    Sam

    Tuesday, April 6, 2021 9:32 AM
  • User633026423 posted

    Hi samwu,

    I have rewritten a Inbound rule for Reverse proxy as follow

    Match URL -> Pattern (.*) -> ignore case -> Action -> Rewrite -> https://App Server /{R:1}

    Outbound rule

    Precondition -> ResponseIsHTml  -> {RESPONSE_CONTENT_TYPE} -> ^text/html

    Match -> A,Form,Img . Matches the pattern -> Regular Expressions -> Pattern -> ^http(s)?//apps server/(.*)

    Action -> Rewrite -> http:{R:1}://ReverseProxy/{R:2}

    It works to run URL but when i try to run one application it keep reroute to the app server instead of the reverse proxy

    Wednesday, April 7, 2021 1:54 AM
  • User1065476709 posted

    Hi A.T,

    Precondition -> ResponseIsHTml  -> {RESPONSE_CONTENT_TYPE} -> ^text/html

    Match -> A,Form,Img . Matches the pattern -> Regular Expressions -> Pattern -> ^http(s)?//apps server/(.*)

    Action -> Rewrite -> http:{R:1}://ReverseProxy/{R:2}

    It works to run URL but when i try to run one application it keep reroute to the app server instead of the reverse proxy

    You can refer to this link about how to config reverse proxy with URL rewrite.

    https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

    Best regards,

    Sam

    Wednesday, April 7, 2021 8:43 AM
  • User633026423 posted

    Hi samwu,

    Now the reverse proxy keep throwing me 505 error bad gateway. How do I resolve it?

    thanks

    Monday, April 12, 2021 5:17 AM
  • User1065476709 posted

    Hi A.T,

    Now the reverse proxy keep throwing me 505 error bad gateway. How do I resolve it?

    Can you show me the details of 505 error? The 505 error means that the server can't handle the HTTP version used in the request. And bad gateway is a 502 error, not a 505 error. If it is a 502 error, you can refer to this link for troubleshooting.

    https://docs.microsoft.com/en-us/iis/extensions/troubleshooting-application-request-routing/troubleshooting-502-errors-in-arr

    Best regards,

    Sam

    Monday, April 12, 2021 8:43 AM
  • User633026423 posted

    Hi samwu,

    the error is HTTP Error 502.2 - bad gateway there was a connection  error while trying to route the request 

    Monday, April 12, 2021 9:56 AM
  • User1065476709 posted

    Hi A.T,

    the error is HTTP Error 502.2 - bad gateway there was a connection  error while trying to route the request 

    Could you please provide your rule and the detailed error snapshot? did you try to run the site on a live server without IIS reverse proxy? make sure you enabled the arr on the live server.

    Best regards,

    Sam

    Tuesday, April 13, 2021 3:12 AM
  • User-1511201203 posted

    I am also facing the same problem. Thank you for putting up this question.

    Tuesday, April 13, 2021 7:05 AM
  • User633026423 posted

    Hi samwu,

    My arr was enabled and the url rewrite was working all the while. But now when i disable all the rewrite rules it will appear IIS page. No changes was being made previously. Out of sudden it is not working kinda strange problem.

    Thanks

    Tuesday, April 13, 2021 1:33 PM
  • User1065476709 posted

    Hi A.T,

    My arr was enabled and the url rewrite was working all the while. But now when i disable all the rewrite rules it will appear IIS page. No changes was being made previously. Out of sudden it is not working kinda strange problem.

    This error may be caused by the rule in your url rewrite. Can you show me your url rewrite rule?

    please post more details information about your requirement.

    Best regards,

    Sam

    Wednesday, April 14, 2021 8:49 AM