3 messages in ru.sysoev.nginxconfiguration for proxy_pass/upstream...
FromSent OnAttachments
Mathew DaviesJun 4, 2009 4:11 pm 
Mohammad KolahdouzanJul 14, 2009 5:01 pm 
Maxim DouninJul 14, 2009 6:54 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:configuration for proxy_pass/upstream combinationActions...
From:Mohammad Kolahdouzan (moha@yahoo.com)
Date:Jul 14, 2009 5:01:08 pm
List:ru.sysoev.nginx

I have my own module in which when a request is sent to /mymodule, it'll initiate a new subrequest to "/a1" and passes a bunch of new arguments to it. As an example, a call to "http://localhost/mymodule" will generate a subrequest like "http://a.com/?x=1&y=2" I have a config similar to the following to support that :

server { location /mymodule { my_module; } location /a1 { proxy_pass http://a.com/; } }

Now the issue that I have is when I want to add redundancy. If I change the
config file to something similar to the following:

upstream server1{ server http://a.com; server http://b.com; } server { location /mymodule { my_module; } location /a1 { proxy_pass http://server1; } }

then a request to "http://localhost/mymodule" will generate a subrequest like
"http://a.com/a1/?x=1&y=1". I am wondering what it is that I am doing wrong
which adds "/a1/" to the subrequest to upstream.

Thanks, -M