1. 程式人生 > >nginx叢集配置

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; } }