Issue with Upstream servers & GeoIP

Maxim Dounin mdounin at
Wed Mar 26 11:04:16 UTC 2014


On Wed, Mar 26, 2014 at 02:25:21AM -0000, Alex wrote:

> I am diverting traffic from one specific country (XX) to a specific APP
> server (Server for country XX) using an upstream definition and geoip. See
> definition below.
> Everything works well except when people who live in country XX try to
> access information that is hosted in the other server - this is because
> they may get the URI by doing searching on Google or other search engine. 
> So we are trying to set Nginx so that if we get a URI that is hosted in
> the other server, the user from country XX can still access it.  See the
> "FUN" location definition.
> The problem comes when the person located in country XX sees the
> uri.  Then, he/she gets all the text, but any reference of
> css, jpegs are served by server from country XX, not by the standard
> server that contains the :fun" information.  How can I set it so that is
> being accessed be served entirely by the appropriate server that hosts the
> information?

An obvious solution would be to return appropriate refernces to 
css/jpegs/etc from your "standard server".

Maxim Dounin

More information about the nginx mailing list