Re: [squid-users] Reverse-proxy for site on Google AppEngine

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sat, 02 Jun 2012 14:32:45 +1200

On 2/06/2012 9:50 a.m., Will wrote:
> Hi Eliezer,
>
> Thanks for the excellent explanation.
>
> I changed the conf as you suggested, now for all static pages it works
> great, the address bar shows my.public.domain.com/page1. However, for
> any pages requiring login, it redirects to 'mysite.appspot.com', the
> address bar shows mysite.appspot.com/pagelogin, instead of
> my.public.domain.com/pagelogin which is what I want.

The slightly better way is to use "forcedomain=mysite.appspot.com" on
the cache_peer line. This will force the domain to be that label only
when passed to the specific peer. Inside Squid you can still handle the
public name and route pieces of the site around to other servers under
the public name as needed.

>
> One main reason I want to use Squid as a reverse proxy is sites on
> Google AppEngine is blocked in China by Great Firewall. People in
> mainland China cannot access anysite.appspot.com directly. Therefore,
> if squid redirects to mysite.appspot.com, it defeats my main purpose.
>
> Any ideas?

There is no redirect. What you are doing is URL-rewriting using
defaultsite to do the re-write.

You should be doing the login at Squid, and passing the credentials as
needed to the peer. (cache_peer option "login=PASS" on 3.1 and older,
"login=PASSTHRU" on 3.2+. exact text in both cases)

Amos
Received on Sat Jun 02 2012 - 02:33:21 MDT

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 12:00:03 MDT