problem with reverse proxy

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

problem with reverse proxy

Postby lbeuker » 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
lbeuker
 
Posts: 3
Joined: Nov 24 11 8:04 am

Re: problem with reverse proxy

Postby lbeuker » 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
lbeuker
 
Posts: 3
Joined: Nov 24 11 8:04 am

Re: problem with reverse proxy

Postby adrien » 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
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: problem with reverse proxy

Postby lbeuker » 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!
lbeuker
 
Posts: 3
Joined: Nov 24 11 8:04 am


Return to WinGate

Who is online

Users browsing this forum: No registered users and 2 guests