安装参照连接:
https://www.cnblogs.com/taiyonghai/p/6728707.html
关键分发配置:
upstream ESB_LB {
#server tomcat地址:端口号 weight表示权值,权值越大,被分配的几率越大;
server 192.168.65.136:8080 weight=1;
server 192.168.65.135:8080 weight=1;
}
server {
listen 8100;
server_name localhost; # nginx 本机的 server name
include /etc/nginx/default.d/*.conf;
location {
proxy_pass http://ESB_LB;
}
}