<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><br><span>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 "<a target="_blank" href="http://localhost/mymodule">http://localhost/mymodule</a>" will generate a
subrequest like "<a target="_blank" href="http://a.com/?x=1&amp;y=2">http://a.com/?x=1&amp;y=2</a>"</span><br>I have a config similar to the following to support that :<br><br>server {<br>&nbsp; location /mymodule {<br>&nbsp;&nbsp;&nbsp; my_module;<br>&nbsp; }<br>&nbsp; location /a1 {<br><span>&nbsp;&nbsp;&nbsp; proxy_pass&nbsp; <a target="_blank" href="http://a.com/">http://a.com/</a></span>;<br>&nbsp; }<br>}<br><br><br>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:<br><br>upstream server1{<br><span>&nbsp; server <a target="_blank" href="http://a.com">http://a.com</a>;</span><br><span>&nbsp; server <a target="_blank" href="http://b.com">http://b.com</a>;</span><br>}<br>server {<br>
&nbsp; location /mymodule {<br>
&nbsp;&nbsp;&nbsp; my_module;<br>
&nbsp; }<br>
&nbsp; location /a1 {<br><span>
&nbsp;&nbsp;&nbsp; proxy_pass&nbsp; <a target="_blank" href="http://server1">http://server1</a>;</span><br>
&nbsp; }<br>
}<br><br><span>then a request to "<a target="_blank" href="http://localhost/mymodule">http://localhost/mymodule</a>" will generate a subrequest like "<a target="_blank" href="http://a.com/a1/?x=1&amp;y=1">http://a.com/a1/?x=1&amp;y=1</a>". I am wondering what it is that I am doing wrong which adds "/a1/" to the subrequest to upstream.</span><br><br>Thanks,<br>-M<br><br></div><br>

      </body></html>