Score:1

4D app with https via IIS reverse proxy not working

ar flag

I am trying to set up a simple reverse proxy for http and https for a 4D app running on a windows server 2012 R2. I got http working but not https. When I open the public firewall and access the 4D app directly https is working fine. Could someone give me a hint of what I am doing wrong or what I need to do to also get https working?

This is what I did: I opened the ARR reverse proxy settings form for the main server and entered the following values: Enable Proxy Pass through Keep alive Timeout=120 X-Forwarded-For Include TCP port from client IP Memory cache duration=60s Enable disk cache Ignore query string Response buffer =4096 kb Threshold = 256 kb Use Url Rewrite to inspect incoming requests Reverse Proxy = DNSName:LocalHttpPort

After saving the ARR reverse proxy settings form, two URL-Rewrite Rules „ARR_server_proxy“ and „ARR_server_proxy_SSL“ were automatically created. All I needed to do was to fill in the field for the recoded URL. For the http Rule I entered: „http://DNSName:LocalHttpPort/{R0}“ For the https Rule I entered: „https://DNSName:LocalSSLPort/{R0}“

As I mentioned above these settings work for http. When I try https, I get a browser timeout. I read somewhere that I need to import the SSL-certificate + private key that I set up for the 4D app to IIS. I did this, but then I could not figure out how to bind it to the main server? And whether I need to set „Enable SSL offloading“ if I did this?

I also read somewhere else that I should enter in the Reverse Proxy field of the ARR reverse proxy settings form only the DNSName. I entered DNSName:LocalHttpPort. When I enter only the DNSName i get a Browser timeout. After reading dozens of contributions on this topic I got more and more confused.

here is the XML of the rewrite rules:(added 19.08.2021 14:00 MEZ)

<proxy enabled="true" />  
 <rewrite>  
     <globalRules>  
         <rule name="ARR_server_proxy_SSL" enabled="true" patternSyntax="Wildcard" stopProcessing="true">  
             <match url="*" />  
             <conditions>  
                 <add input="{HTTPS}" pattern="on" />  
             </conditions>  
             <action type="Rewrite" url="https://h25XXXXX.stratoserver.net:4443/{R:0}" />  
         </rule>  
         <rule name="ARR_server_proxy" enabled="true" patternSyntax="Wildcard" stopProcessing="true">  
             <match url="*" />  
             <action type="Rewrite" url="http://h25XXXXX.stratoserver.net:4000/{R:0}" />  
             <conditions>  
                 <add input="{HTTPS}" pattern="on" negate="true" />  
             </conditions>  
             <serverVariables>  
             </serverVariables>  
         </rule>  
     </globalRules>  
     <allowedServerVariables>  
         <add name="{HTTPS}" />  
     </allowedServerVariables>  
 </rewrite>  
Lex Li avatar
vn flag
Open IIS configuration file (applicationHost.config) and show us the XML elements for rewrite rules (by editing the question) please. Besides, FRT can tell you more about what happens under the hood, https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
ar flag
thanks Lex Li - I will wait to see if I get a comment on my rewrite rules - XML before I get into troubleshooting
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.