a reverse proxy issue

SplitIce mat999 at gmail.com
Tue Nov 23 10:18:09 MSK 2010


you have to use regex for the location 's

On Tue, Nov 23, 2010 at 6:13 PM, skk <nginx-forum at nginx.us> wrote:

> I have an enviroment as follows:
>
>       PC(192.168.95.2) ------ReverseProxy(Run Nginx,192.168.95.1
> and 192.168.1.1)---------------OA Server(192.168.1.100)
>
>                                                 ---------------Mail
> Server(192.168.1.200)
>
>      PC want to access oa server1 and mail server through reverse
> proxy,My config is :
>
>    upstream OA {
>        server  192.168.1.100;
>    }
>    upstream  MAIL {
>        server  192.168.1.200;
>    }
>  server {
>        listen       80;
>        server_name  192.168.95.1;
>
>        location  /oa/ {
>               proxy_pass  http://OA/;
>               proxy_set_header Host $host/oa;
>               proxy_set_header X-Forwarded-For $remote_addr;
>          }
>       location  /mail/ {
>            proxy_pass  http://MAIL/;
>            proxy_set_header Host $host/mail;
>           proxy_set_header X-Forwarded-For $remote_addr;
>        }
>
>   PC access OA server by http://192.168.95.1/oa/, access Mail server by
> http://192.168.95.1/mail/.
>   But content return from OA server  include some URL:
>   1)  /abc/xxxx/....
>        These urls will be http://192.168.95.1/abc/xxxx/.... in
> PC,They can't be proxy.
>   2) http://192.168.1.100/efg/xxxx/...
>       These urls will be http://192.168.1.100/efg/xxxx/... in PC, but
> PC can't access 192.168.1.100 directly.
>    3)  http://192.168.1.200/ghi/xxxx/....
>         These urls will be http:// 192.168.1.200/ghi/xxxx/.... in PC,
> but PC can't access 192.168.1.200 directly.
>    4) https://192.168.1.100/opq/xxxxxx/....
>    5) https://192.168.1.200/rst/xxxxxx/....
>
>    All above urls can't be access by PC, How to config my Nginx?
>
>    Thanks.
>
> Posted at Nginx Forum:
> http://forum.nginx.org/read.php?2,152568,152568#msg-152568
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



-- 
Warez Scene <http://thewarezscene.org> Free Rapidshare
Downloads<http://www.nexusddl.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20101123/a7b4828a/attachment.html>


More information about the nginx mailing list