nginx 負載均衡

nginx 負載均衡
 


 # weight=3  權重
 # backup  備用服務,不參與負載,除非其他的宕機


    upstream tomcat_server{
        server 127.0.0.1:8080 weight=3;
        server 127.0.0.1:8081 weight=1;
    }


    server {
        listen   80;
        server_name 192.168.174.129;

        location / {
           # proxy_pass http://127.0.0.1:8080;

            proxy_pass http://tomcat_server;
            include proxy.conf;
        }

    }

 

發佈了52 篇原創文章 · 獲贊 8 · 訪問量 4萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章