Need to proxypass to different servers.

Francis Daly francis at
Tue Mar 19 20:17:17 UTC 2013

On Tue, Mar 19, 2013 at 07:42:25PM +0530, Geo P.C. wrote:

Hi there,

> location / {
>     proxy_pass;  #app1
> }
> location /cms {
>     proxy_pass;   #
> }

> 1. à Working fine getting the contents of app1 server
> 2. à Working fine getting the contents of app1 server

So far, so good.

> 3. à Not working. Site proxypass to app2 server but
> we are getting a 404 page.

What request do you want nginx to make of the app2 server here? -- /,
/cms, or something else?

What request is nginx making of the app2 server? -- check the app2 server
logs, if the nginx logs don't tell you.

If you make either of those requests of app2 yourself (using curl),
do you get what you expect?

> 4. àSame as above result.

Same questions. What do you want to happen? What does happen?

> For your information the cms application running app2 server is graphite
> server and you can find the nginx configuration file from the url:
> in which we use the server name as

Unless graphite is one of those special and beautiful apps that allow
themselves to be easily reverse-proxied at a non-root url, you may end
up happier if you just use two separate server{} blocks with different
server_name directives.

But that can be worried about after you see how your /cms locations work.

Francis Daly        francis at

More information about the nginx mailing list