nginx.pre.yohobuy.conf.conf 13.1 KB

server
{
    listen       80;
    server_name  m.yohobuy.com *.m.yohobuy.com;

    #access_log /Data/logs/access.buy.test.yoho.cn.log  combined;
    error_log  /Data/logs/nginx/error.m.yohobuy.com.log warn;

    root  /Data/code/git/yohobuy/yohobuy/m.yohobuy.com/public;

    location ~* \.(ico|woff)$ {
        expires    7d;
    }

    location = /crossdomain.xml {
        expires    7d;
    }

    location = /appembed {
        default_type application/json;
        return 200 '{"code":200,"message":"appembed","data":{"open":"N","url":"http://m.yohobuy.com"}}';
    }

    location = /reg.html {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /signin.html {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /login.html {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /emailback.html {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /phoneback.html {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /help/shareorder.html {
        root  /Data/code/git/yohobuy/yohobuy/assets;
    }
    location = /error.html {
        root  /Data/code/git/yohobuy/yohobuy/assets;
        expires 7d;
    }
    location ^~ /passport/reg {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /passport/login {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /passport/back {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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;
        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 = /boys {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /girls {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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;
        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;
        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 = /girl {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /boys/bottomBanner {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /girls/bottomBanner {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /cate {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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;
        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 = /sale {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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/search {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /product/new {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 = /hotrank {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /product/newsale/ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /product/opt/ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /product/recom/ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /product/pro_ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /product/intro_ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /product/detail/ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /guang/ {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /tags/index {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /author/index {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~  /info/index {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~  /plustar {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /search {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /index/search {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /home {
        proxy_redirect off;
        proxy_pass http://yohobuy;
        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 ^~ /home/message {
        proxy_redirect off;
        proxy_pass http://61.155.222.163;
        proxy_set_header   Host   m.yohobuy.com;
        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 = /home/orders/detail {
        proxy_redirect off;
        proxy_pass http://61.155.222.163;
        proxy_set_header   Host   m.yohobuy.com;
        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 = /home/orders/cancel {
        proxy_redirect off;
        proxy_pass http://61.155.222.163;
        proxy_set_header   Host   m.yohobuy.com;
        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://61.155.222.163;
        proxy_set_header   Host   m.yohobuy.com;
        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";
    }

}