<div dir="ltr"><div style="font-size:12.8px">I just use Nginx for a couple of weeks. I have the following questions. I hope I can get your help.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I have a big web application whose urls are <a href="http://dev01.mydomain.com/" target="_blank">dev01.mydomain.com</a>, dev02.mydomain and <a href="http://dev03.mydomain.com/" target="_blank">dev03.mydomain.com</a>. I like to use Nginx to deliver this application for its users. On each page, there are a lot of iframes whose src can be one of <a href="http://dev01.mydomain.com/" target="_blank">dev01.mydomain.com</a>, dev02.mydomain and <a href="http://dev03.mydomain.com/" target="_blank">dev03.mydomain.com</a>. I like to use following conf to achieve one url for its users:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>server {</div><div>        listen       80;</div><div>        server_name  localhost;</div><div><br></div><div>        #charset koi8-r;</div><div>        #access_log  /var/log/nginx/log/host.<wbr>access.log  main;</div><div><br></div><div>        location / {</div><div>            root   /usr/share/nginx/html;</div><div>            index  index.html index.htm;</div><div><br></div><div>            proxy_pass <a href="http://dev01.mydomain.com/" target="_blank">http://dev01.mydomain.com/</a>;</div><div>            subs_filter '<a href="http://dev02.mydomain.com/(.*)" target="_blank">http://dev02.mydomain.com/(.*<wbr>)</a>' '<a href="http://dev01.mydomain.com/?http://dev02.mydomain.com/$1" target="_blank">http://dev01.mydomain.com/?<wbr>http://dev02.mydomain.com/$1</a>';</div></div><div style="font-size:12.8px">            subs_filter '<a href="http://dev03.mydomain.com/(.*)" target="_blank">http://dev03.mydomain.com/(.*<wbr>)</a>' '<a href="http://dev01.mydomain.com/?http://dev03.mydomain.com/$1" target="_blank">http://dev01.mydomain.com/?<wbr>http://dev03.mydomain.com/$1</a>';</div><div style="font-size:12.8px">         }</div><div style="font-size:12.8px">}</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">My requirements are:</div><div style="font-size:12.8px"> (1). Request with url - <a href="http://www.mydomain.com/?http://." target="_blank">http://www.mydomain.com/?http:<wbr>//.</a>.. will proxy to <a href="http://dev02.mydomain.com/" target="_blank">http://dev02.mydomain.com/</a> or <a href="http://dev03.mydomain.com/" target="_blank">http://dev03.mydomain.com/</a> depending on a value after ?</div><div style="font-size:12.8px"> (2). Other request will proxy to <a href="http://dev01.mydomain.com/" target="_blank">http://dev01.mydomain.com/</a>.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">How do I achieve these requirements?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks,</div><div><br></div></div>