nginx.rls.web.yohobuy.com.conf 7.84 KB
server
{
    listen       80;
    server_name  www.yohobuy.com;
    root  /Data/PE/yohobuy-pc/yohobuy/www.yohobuy.com/public;

    # 频道相关
    location = / {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc-abtest;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /woman {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /kids {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /lifestyle {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    location ^~ /common {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /brands {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location ^~ /brands/plusstar {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location ^~ /brands/brandList {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location ^~ /brands/brandinfo {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    # 其它默认
    location / {
        proxy_redirect off;
        proxy_pass http://yohobuy-old-www;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    location =/favicon.ico {
        expires    30d;
    }
    location =/crossdomain.xml {
        expires    30d;
    }
    location =/robots.txt {
        expires    1d;
    }
}

server
{
    listen       80;
    server_name  new.yohobuy.com;
    root  /Data/PE/yohobuy-pc/yohobuy/www.yohobuy.com/public;

    # 频道相关
    location = / {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /woman {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /kids {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location = /lifestyle {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    location ^~ /common {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    location = /brands {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location ^~ /brands/plusstar {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location ^~ /brands/brandList {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    location ^~ /brands/brandinfo {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    # 其它默认
    location / {
        proxy_redirect off;
        proxy_pass http://yohobuy-old-new;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }

    location =/favicon.ico {
        expires    30d;
    }
    location =/crossdomain.xml {
        expires    30d;
    }
    location =/robots.txt {
        expires    1d;
    }
}

server
{
     listen       80;
     server_name  huodong.yohobuy.com;
     root  /Data/PE/yohobuy_PC/yohobuy/huodong.yohobuy.com/public;

     location ^~ /cuxiao {
        proxy_redirect off;
        proxy_pass http://yohobuy-pc;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }
    
    location / {
        proxy_redirect off;
        proxy_pass http://yohobuy-old-huodong;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   Accept-Encoding "gzip";
    }


    location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
        expires    30d;
    }
    location =/crossdomain.xml {
        expires    30d;
    }
    location =/sitemap.xml {
        expires    1d;
    }
    location =/robots.txt {
        expires    1d;
    }
}