nginx-1.7.0 for windows 负载均衡配置文件示例

详细请参照官方在线文档,直接贴上示例配置文件:

worker_processes  1;

events {
    worker_connections  1024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    
    sendfile        on;
    
    upstream group_v_mfniu_com{        
        server 127.0.0.1:8081 weight=3;
    }

    server {
        listen       80;
        server_name  b.com www.b.com;
        location / {
            proxy_pass http://group_v_mfniu_com;            
        }
    }
    
    server {
        listen       80;
        server_name  a.com www.a.com;
        location / {
            proxy_pass http://www.a.com:8080;            
        }
    }
}

 

 

 

posted @ 2014-04-27 16:34  SmartBooks  阅读(667)  评论(0编辑  收藏  举报