nginx load balancer with geoip?

Francis Daly francis at
Fri Mar 2 19:49:58 UTC 2012

On Fri, Mar 02, 2012 at 09:31:05AM -0500, delphixe2 wrote:

Hi there,

> work looks fine, request in korea perfectly proxied to and
> other requests go to BUT! the problem appeared.
> you can see the problem in this url :

I can't get to, so I can't test this directly.

> (original
> url:
> can't see the problem? let you explain it.
> see my image :

I *think* this says "the proxied server creates links to its local
resources using http:// and whatever the client sent in the Host: header".

You can try adding

 proxy_set_header Host $host;

> location / {
> proxy_pass  http://$geo;
> }

inside that location, so that the Host: header used will probably be
resolvable by the client.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list