Need to proxypass to different servers.
Francis Daly
francis at daoine.org
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 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 at daoine.org
More information about the nginx
mailing list