安裝參照連接:
https://www.cnblogs.com/taiyonghai/p/6728707.html
關(guān)鍵分發(fā)配置:
upstream ESB_LB {
? #server tomcat地址:端口號(hào) weight表示權(quán)值,權(quán)值越大,被分配的幾率越大;
? server 192.168.65.136:8080 weight=1;
? server 192.168.65.135:8080 weight=1;
}
server {
? ? listen 8100者铜;
? ? server_name ?localhost; # nginx 本機(jī)的 server name????
? ? include ?/etc/nginx/default.d/*.conf;
? ? location {
? ? ? ? proxy_pass http://ESB_LB;
????}
}