Welcome! Log In Create A New Profile

Advanced

a reverse proxy issue

skk
November 23, 2010 02:13AM
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.
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: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready