所有业务线到Nginx,然后分发到网关1(81端口)和网关2(82端口)
C:\Windows\System32\drivers\etc\hosts
添加:127.0.0.1 infosys.gateway.com
nginx.conf配置如下:
upstream gateway {
server 127.0.0.1:81;
server 127.0.0.1:82;
}
server {
listen 80;
server_name infosys.gateway.com;
location / {
proxy_pass http://gateway/;
}
}