Switch to full style
Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

problem with reverse proxy

Nov 29 12 9:49 am

Hi,

About a year ago I setup a reverse proxy voor 2 internal (virtual) machines.
With a bit support i fixed it in a standard license using a policy with a serverrequest and multiple map lookups.
By checking on host and setting the result to Website.Response = 1 it eventually worked.

It crashed a long time ago and just wanted to rebuild the same setup.

But now I cant get it to work. It looks like the map lookup had only one out (true) where it had 2 in the past.

I end up with socket errors. The only way to fix these is change the www service to reverse proxy mode. But then i have to set an IP and the settings in de map lookup get lost.

Is it stil posible to change the host using the map lookup?

Kind regards,
Lennard Beuker

Re: problem with reverse proxy

Nov 30 12 2:32 am

setting the www service to proxy and using the mapping item with Result: Request.Headers.Set("Host",Result); Website.Response = 1;
gets me close.

i now get stuck at retranslating internal ips to external urls in 302 redirects and hostnamed hrefs.
Are these also mappable in a proxyresponse? You cant set the location. it should be a sort of replace on the host part of the url

Re: problem with reverse proxy

Nov 30 12 6:51 am

Hi

the reverse proxy doesn't modify content in HTML going back out, is this what you mean?

But if you have outbound 302s you should be able to modify the location header with something like

s = Response.Headers.Get("Location");
s.Replace("a", "b");
Response.Headers.Set("Location", s);

what sort of license do you have? This may be easier in script than an expression evaluator.

Regards

Adrien

Re: problem with reverse proxy

Dec 01 12 2:35 am

thanks! it works!

i have the standard license, so no easy script possibilities. But using the map as script placeholder is a nice workaround.
replace did the job!
Post a reply