1. 程式人生 > >伺服器最簡單架構設計

伺服器最簡單架構設計

upstream docs.com{
                server 192.168.67.131:80 weight=1;
                server 192.168.67.132:80 weight=1;
        }

server
    {
        listen 80 default_server;
        server_name _;
        location /{
                proxy_pass http:docs.com;
        }
    }

server中proxy_pass是web伺服器中的server地址

upstream 必須和server中proxy_pass一致