nginx集群配置

    #集群配置
    upstream tomcats{
        # server 192.168.85.131:8080 weight=5;
        server 127.0.0.1:8080;
        server 127.0.0.1:8090;
    }
    
    
    #反响代理配置  127.0.0.1或localhost访问
    server {
        listen       80;
        server_name  localhost;

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        
        # 要进行反响代理的地址
        location / {
            # proxy_pass   http://127.0.0.1:8080;
            proxy_pass http://tomcats;
        }

    }

 

posted @ 2018-12-25 12:57  HaniLucky  阅读(215)  评论(0编辑  收藏  举报