nginx 配置反向代理

1)編輯vi nginx.conf,找到http{} 在裏面加入

    

    upstream ucentertomcat {

    server 192.168.100.108:8080 weight=1;

    server 192.168.100.105:8080 weight=1;

    server 192.168.100.106:8080 weight=1;

    }

    在server{}裏面加入

    

    location /ucenter {

            proxy_pass   http://ucentertomcat;

            index  index.html index.htm;

    }


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章