码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 灰度配置文件

时间:2017-06-12 22:18:14      阅读:301      评论:0      收藏:0      [点我收藏+]

标签:business   配置文件   listen   server   

 server {
        listen       80;
        server_name  i.shequbanjing.com 172.16.201.1;

        charset UTF-8;

        access_log  logs/i.shequbanjing.com.access.log  main;
        error_log  logs/i.shequbanjing.com.error.log  warn;


        location /business/api {
                if ( $http_x_forwarded_for ~ 106.14.94.192,61.50.105.10 ) {
                        rewrite ^/business/(.*)$ /$1 break;
                        proxy_pass http://pool_businessapi.sqbj.com_tomcat_hd;
                }
            proxy_pass http://pool_businessapi.sqbj.com_tomcat/api;
        }

        location /common/api {
                if ( $http_x_forwarded_for ~ 106.14.94.192,61.50.105.10 ) {
                        rewrite ^/common/(.*)$ /$1 break;
                        proxy_pass http://pool_businessapi.sqbj.com_tomcat_hd;
                }
            proxy_pass http://pool_businessapi.sqbj.com_tomcat/api;
        }

        location /pay/api {
                if ( $http_x_forwarded_for ~ 106.14.94.192,61.50.105.10 ) {
                        rewrite ^/pay/(.*)$ /$1 break;
                        proxy_pass http://pool_payapi.sqbj.com_tomcat_hd;
                }
            proxy_pass http://pool_payapi.sqbj.com_tomcat/api;
        }


        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
~                                                                                                                                                                                      
~


nginx 灰度配置文件

标签:business   配置文件   listen   server   

原文地址:http://mstools.blog.51cto.com/1104047/1934646

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!