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

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Tue, 05 Jun 2012 13:33:27 +1200

On 05.06.2012 06:22, Will wrote:
> Thanks for the reply, Amos.
>
> I tried forceddomain=mysite.appspot.com, I got the same behavior.
>
> Perhaps I'm not clear on the problem.
>
> Because in China one cannot directly access a site on Google
> AppEngine, I setup an Apache reverse proxy server to my site on GAE,
> and it works very well. Now I'm thinking migrating to Squid from
> Apache because Squid provides rich caching.
>
> With Eliezer's help, I managed to have the basic reverse-proxy going,
> now when people visit 'my.public.domain.com', they get the content of
> 'mysite.appspot.com' which is on Google AppEngine. However, it only
> works for static pages. As soon as you hit a page that requires
> login,
> the browser's address bar shows 'mysite.appspot.com/login' and from
> that point on, all traffic goes to 'mysite.appspot.com' directly.

This is where having the proxy doing auth and passing the credentials
to the peer comes in. The peer never gets to the point of needing to
send those redirects.

>
> Internally, when one visits a page requires login, the code redirects
> to the login page if one hasn't logged in. All path is relative, and
> it works for Apache reverse-proxy server.

The Location: header of a redirect does not permit relative paths. So
the peer should be emitting absolute-URLs based on the domain name it
thinks the client is visiting (which is "mysite.appspot.com").

Amos
Received on Tue Jun 05 2012 - 01:33:32 MDT

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