Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

Re: Need to proxypass to different servers.

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

Hi there,

> location / {
> proxy_pass http://192.168.0.1/; #app1
> }
>
> location /cms {
> proxy_pass http://192.168.0.2/; #
> }

> 1. geotest.com à Working fine getting the contents of app1 server
> 2. geotest.com/a1 à Working fine getting the contents of app1 server

So far, so good.

> 3. geotest.com/cms à 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. geotest.com/cmsssss à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:
> http://www.frlinux.eu/?p=199 in which we use the server name as geotest..com

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.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 53287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>