frp 多个web服务内网映射外网IP

服务端配置:

[common]

bind_port=6001

token = 2012

 

[web1]

listen_port= 6002   ------- web1远程端口

[web2]

listen_port = 6003  -------web2远程端口

=======================================================

客户端配置:

[common]

server_addr = 111.111.111.1111

server_port=6001

token = 2012

 

[ssh_1]

type=tcp

local_ip = 192.168.1.5

local_port=22

remote_port=6010

 

[oracle_1]

type=tcp

local_ip = 192.168.1.5

local_port=1521

remote_port=6011

 

[web1]

type = tcp

local_port=6002

local_ip=192.168.1.5

remote_port=6002

 

[web2]

type = tcp

local_port=6003

local_ip=192.168.1.5

remote_port=6003

 

==========================

nginx 配置

server {

  listen 6002;

  server_name 192.168.1.5;

  location / {

    proxy_pass http://192.168.1.5:8082

  }  

}

server {

  listen 6003;

  server_name 192.168.1.5;

  location / {

    proxy_pass http://192.168.1.5:8083

  }  

}

 

=========远程地址访问web:

111.111.111.1111:6002

111.111.111.1111:6003

 

posted @ 2021-01-25 16:49  wuchangsoft  阅读(1206)  评论(0编辑  收藏  举报