Welcome! Log In Create A New Profile

Advanced

Re: a reverse proxy issue

SplitIce
November 23, 2010 02:22AM
you have to use regex for the location 's

On Tue, Nov 23, 2010 at 6:13 PM, skk <nginx-forum@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@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>



--
Warez Scene http://thewarezscene.org Free Rapidshare
Downloadshttp://www.nexusddl.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

a reverse proxy issue

skk November 23, 2010 02:13AM

Re: a reverse proxy issue

SplitIce November 23, 2010 02:22AM

Re: a reverse proxy issue

skk November 24, 2010 10:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 310
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready