Atozed Forums
reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 (/thread-1376.html)

Pages: 1 2 3


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - Alexandre Machado - 02-05-2020

It can't be correct if it is rewriting stuff on the fly. IW doesn't need that. IP being written is a direct consequence of rewriting stuff that shouldn't be rewritten


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - Alexandre Machado - 02-05-2020

Why are you using "MyApp/" and "Proxy/" as URL base on your web.config file???

The document I published is a *general guide* a *how to*. The names of my sample applications and the IP addresses I used are *examples*. It doesn't apply as is to your application. If you just copied it of course it won't work!


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - PDSBILL - 02-05-2020

(02-05-2020, 10:34 AM)Alexandre Machado Wrote: Why are you using "MyApp/" and "Proxy/" as URL base on your web.config file???

The document I published is a *general guide* a *how to*. The names of my sample applications and the IP addresses I used are *examples*. It doesn't apply as is to your application. If you just copied it of course it won't work!

Our customer setup a test domain and I asked them to follow the instructions replacing the App name and IP address of the proxy as required.
My program does work with this setup if I use  OnClick to go to another form but not if I use onAsyncClick. I set the rewrite rule in the serverController onConfig to MyApp to match the name in the rewrite rule.

This is what we have in our new test setup on the proxy server. The 

   <rule name="Rewrite rule for ISAPI Intraweb application" stopProcessing="true">
              <match url="^MyApp/(.*)" />
              <action type="Rewrite" url="http://10.10.250.38/webppreviewer_test/ppwebreviewer.dll/{R:1}" logRewrittenUrl="true" />
            </rule>

The url I am going to is https://cdp.palmcoastgov.com/myapp/
The destination url is v-PercontiSrv01.ci.palm-coast.fl.us/webppreviewer_test/ppwebreviewer.dll

is this what the rewrite rule should look like? if not can you tell us how it should look.

  <rule name="Rewrite rule for ISAPI Intraweb application" stopProcessing="true">

              <match url="^MyApp/(.*)" />
              <action type="Rewrite" url="http://v-PercontiSrv01.ci.palm-coast.fl.us/ppwebreviewer.dll/{R:1}" logRewrittenUrl="true" />
            </rule>

Bill B




RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - Alexandre Machado - 02-05-2020

What's the host name returned by server with IP 10.10.250.38 ?

This is the key. Please add this server variable to your inbound rule:


[Image: HTTP_HOST.png]


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - Alexandre Machado - 02-06-2020

I'll add something to the redirection layer which will avoid this and you don't need to add a server host variable in the rewritten request. Hold on and I'll have a build for you to test, compatible with 15.1.12


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - PDSBILL - 02-07-2020

OK, We have it fixed. We changed the rewrite rule from IP address to domain url point to destination and added the destination to the proxy servers HOST file

I cannot update to 15.1.12 or higher as our license ended with 15.1.9.

Thank you again for your help. I took awhile but worth it.

Bill B


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - Alexandre Machado - 02-07-2020

Hum... We just released a new update IW 15.1.13 which will probably work on our scenario without any of those changes (except for the URL rewrite rule itself).

Thanks for the feedback


RE: reverse proxy issue? Fails on 15.1.5 works on 15.0.17 - PDSBILL - 02-07-2020

You may want to update you document on reverse proxy for users not able to update to 15.1.13 (like me) with details on using a Server Variable to replace IP Address.
also fix the missing single quote
procedure TIWServerController.IWServerControllerBaseConfig(Sender: TObject);
begin
Self.RewriteURL := '/MyApp; // this must match the URL Rewrite rule
end;