宗小宗-PHP程序猿

欢迎各位朋友前来,如果我的文章中有不对的地方,还望指正;如需转载,请注明原处

Nginx负载均衡配置

upstream abc.com{
        server 192.168.66.121;#域名无效,负载均衡实质是内网发挥作用,用域名就走外网了,没意义
        server 192.168.66.122;
}
server {
        listen 8005;
        server_name 192.168.6.120:8005;
        log_not_found off;
        access_log  /var/log/nginx/html-access.log  main;
        charset utf-8;
        location / {
                proxy_pass http://abc.com;
        }
}

 

posted @ 2016-03-31 18:19  宗小宗  阅读(169)  评论(0编辑  收藏  举报