Regarding ERROR: XmlParseFailure

Francis Daly francis at daoine.org
Sun Aug 10 11:11:37 UTC 2014


On Sun, Aug 10, 2014 at 10:12:32AM +0530, Pankaj Kaushik wrote:

Hi there,

> I have understanding that $uri will be changed to actual uri when location
> block will be parsed.

Your understanding is wrong.

> why is it not happening?

Because your understanding is wrong.

> There are two scenario in my case.
> 
> My uri can contain two values one is "/" and other is let say "/abc/def"
> (this value is dynamic and can change according to the client request).

  location = / {
    # config for when the request is exactly "/"
  }
  location / {
    # config for when the request is anything else that starts with "/"
  }

http://nginx.org/r/location

> So i want to redirect above uri values to different upstream server.
> 
> How can i do this?

Put the right config in the right location{}.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list