Welcome! Log In Create A New Profile

Advanced

forward data from orginal IP to a new IP

May 31, 2016 05:11AM
I have this configure file, but it is long-winded。
in nginx, are there having one expression to handle it

server {
listen 192.168.1.2:10000;
proxy_pass 192.168.0.3:10000;
}

server {
listen 192.168.1.2:10001;
proxy_pass 192.168.0.3:10001;
}

server {
listen 192.168.1.2:10002;
proxy_pass 192.168.0.3:10002;
}

server {
listen 192.168.1.2:10003;
proxy_pass 192.168.0.3:10003;
}

server {
listen 192.168.1.2:10004;
proxy_pass 192.168.0.3:10004;
}

server {
listen 192.168.1.2:10005;
proxy_pass 192.168.0.3:10005;
}

server {
listen 192.168.1.2:10006;
proxy_pass 192.168.0.3:10006;
}

server {
listen 192.168.1.2:10007;
proxy_pass 192.168.0.3:10007;
}

server {
listen 192.168.1.2:10008;
proxy_pass 192.168.0.3:10008;
}

server {
listen 192.168.1.2:10009;
proxy_pass 192.168.0.3:10009;
}

server {
listen 192.168.1.2:10010;
proxy_pass 192.168.0.4:10010;
}

server {
listen 192.168.1.2:10011;
proxy_pass 192.168.0.4:10011;
}

server {
listen 192.168.1.2:10012;
proxy_pass 192.168.0.4:10012;
}

server {
listen 192.168.1.2:10013;
proxy_pass 192.168.0.4:10013;
}

server {
listen 192.168.1.2:10014;
proxy_pass 192.168.0.4:10014;
}

server {
listen 192.168.1.2:10015;
proxy_pass 192.168.0.4:10015;
}

server {
listen 192.168.1.2:10016;
proxy_pass 192.168.0.4:10016;
}

server {
listen 192.168.1.2:10017;
proxy_pass 192.168.0.4:10017;
}

server {
listen 192.168.1.2:10018;
proxy_pass 192.168.0.4:10018;
}

server {
listen 192.168.1.2:10019;
proxy_pass 192.168.0.4:10019;
}
Subject Author Posted

forward data from orginal IP to a new IP

alajl May 31, 2016 05:11AM

Re: forward data from orginal IP to a new IP

B.R. May 31, 2016 12:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready