一台做负载均衡分发

114.55.116.177

以下三台做业务处理器

118.178.243.35

118.178.236.8

118.178.136.39

114.55.116.177负载均衡nginx配置:

    http    
     {
             upstream baobei{
                   server 118.178.236.8:8080;
                   server 118.178.243.35:8080;
                   server 118.178.136.39:8080;
              }
    }
    server {
             listen 80;
             server_name www.xihuanbaobei.com;
             location / {
                 #反向代理的地址
                 proxy_pass http://baobei/;
             }
     }

3台业务处理器nginx上配置:


    server {    
        listen 8080;
        root /home/wwwroot/xhbb;
        index index.php index.htm index.html;
        server_name 118.178.136.39;
        access_log  /home/wwwlogs/access.log;
        location / {
            if (!-e $request_filename){
                rewrite ^/(.*)$ /index.php?$1 last;
            }
        }
    }

1 thought on “ECS nginx负载均衡实施方案”

  1. 在阿里云上买了几台ECS,可以做下实验,可以买一周,用不了多少钱,自己配下,还是能收获不少

发表评论

电子邮件地址不会被公开。 必填项已用*标注