you have to use regex for the location 's<br><br><div class="gmail_quote">On Tue, Nov 23, 2010 at 6:13 PM, skk <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have an enviroment as follows:<br>
<br>
PC(192.168.95.2) ------ReverseProxy(Run Nginx,192.168.95.1<br>
and 192.168.1.1)---------------OA Server(192.168.1.100)<br>
<br>
---------------Mail<br>
Server(192.168.1.200)<br>
<br>
PC want to access oa server1 and mail server through reverse<br>
proxy,My config is :<br>
<br>
upstream OA {<br>
server 192.168.1.100;<br>
}<br>
upstream MAIL {<br>
server 192.168.1.200;<br>
}<br>
server {<br>
listen 80;<br>
server_name 192.168.95.1;<br>
<br>
location /oa/ {<br>
proxy_pass <a href="http://OA/" target="_blank">http://OA/</a>;<br>
proxy_set_header Host $host/oa;<br>
proxy_set_header X-Forwarded-For $remote_addr;<br>
}<br>
location /mail/ {<br>
proxy_pass <a href="http://MAIL/" target="_blank">http://MAIL/</a>;<br>
proxy_set_header Host $host/mail;<br>
proxy_set_header X-Forwarded-For $remote_addr;<br>
}<br>
<br>
PC access OA server by <a href="http://192.168.95.1/oa/" target="_blank">http://192.168.95.1/oa/</a>, access Mail server by<br>
<a href="http://192.168.95.1/mail/" target="_blank">http://192.168.95.1/mail/</a>.<br>
But content return from OA server include some URL:<br>
1) /abc/xxxx/....<br>
These urls will be <a href="http://192.168.95.1/abc/xxxx/.." target="_blank">http://192.168.95.1/abc/xxxx/..</a>.. in<br>
PC,They can't be proxy.<br>
2) <a href="http://192.168.1.100/efg/xxxx/." target="_blank">http://192.168.1.100/efg/xxxx/.</a>..<br>
These urls will be <a href="http://192.168.1.100/efg/xxxx/." target="_blank">http://192.168.1.100/efg/xxxx/.</a>.. in PC, but<br>
PC can't access 192.168.1.100 directly.<br>
3) <a href="http://192.168.1.200/ghi/xxxx/.." target="_blank">http://192.168.1.200/ghi/xxxx/..</a>..<br>
These urls will be http:// <a href="http://192.168.1.200/ghi/xxxx/.." target="_blank">192.168.1.200/ghi/xxxx/..</a>.. in PC,<br>
but PC can't access 192.168.1.200 directly.<br>
4) <a href="https://192.168.1.100/opq/xxxxxx/.." target="_blank">https://192.168.1.100/opq/xxxxxx/..</a>..<br>
5) <a href="https://192.168.1.200/rst/xxxxxx/.." target="_blank">https://192.168.1.200/rst/xxxxxx/..</a>..<br>
<br>
All above urls can't be access by PC, How to config my Nginx?<br>
<br>
Thanks.<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,152568,152568#msg-152568" target="_blank">http://forum.nginx.org/read.php?2,152568,152568#msg-152568</a><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><a href="http://thewarezscene.org" target="_blank">Warez Scene</a> <a href="http://www.nexusddl.com" target="_blank">Free Rapidshare Downloads</a><br><br>