...
|
...
|
@@ -17,65 +17,203 @@ server |
|
|
allow 172.16.0.0/16;
|
|
|
deny all;
|
|
|
|
|
|
|
|
|
#账号相关
|
|
|
location = /reg.html {
|
|
|
root /Data/code/git/yohobuy/assets;
|
|
|
expires 7d;
|
|
|
}
|
|
|
location = /emailback.html {
|
|
|
root /Data/code/git/yohobuy/assets;
|
|
|
expires 7d;
|
|
|
}
|
|
|
location = /phoneback.html {
|
|
|
root /Data/code/git/yohobuy/assets;
|
|
|
expires 7d;
|
|
|
}
|
|
|
location = /error.html {
|
|
|
root /Data/code/git/yohobuy/assets;
|
|
|
expires 7d;
|
|
|
}
|
|
|
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 ^~ /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 = / {
|
|
|
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 = /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";
|
|
|
}
|
|
|
|
|
|
# 子域名
|
|
|
if ($host = "sale.test.yoho.cn" ) {
|
|
|
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://61.155.222.162;
|
|
|
proxy_set_header Host cuxiao.m.yohobuy.com;
|
|
|
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";
|
|
|
}
|
|
|
if ($host = "cuxiao.test.yoho.cn" ) {
|
|
|
location ^~ /product/recom/ {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://101.201.176.121;
|
|
|
proxy_set_header Host cuxiao.m.yohobuy.com;
|
|
|
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 {
|
|
|
# 逛相关
|
|
|
location ^~ /guang/ {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://61.155.222.163;
|
|
|
proxy_set_header Host m.yohobuy.com;
|
|
|
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/auth {
|
|
|
location ^~ /tags/index {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://61.155.222.163;
|
|
|
proxy_set_header Host m.yohobuy.com;
|
|
|
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/signin {
|
|
|
location ^~ /author/index {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://61.155.222.163;
|
|
|
proxy_set_header Host m.yohobuy.com;
|
|
|
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 /home {
|
|
|
# 搜索相关
|
|
|
location ^~ /search {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://61.155.222.163;
|
|
|
proxy_set_header Host m.yohobuy.com;
|
|
|
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 /cart {
|
|
|
|
|
|
# 其它访问都跳到老版
|
|
|
location / {
|
|
|
proxy_redirect off;
|
|
|
proxy_pass http://61.155.222.163;
|
|
|
proxy_set_header Host m.yohobuy.com;
|
...
|
...
|
@@ -83,14 +221,33 @@ server |
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
proxy_set_header Accept-Encoding "gzip";
|
|
|
}
|
|
|
|
|
|
# # 子域名
|
|
|
# if ($host = "sale.test.yoho.cn" ) {
|
|
|
# proxy_redirect off;
|
|
|
# proxy_pass http://61.155.222.162;
|
|
|
# proxy_set_header Host cuxiao.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";
|
|
|
# }
|
|
|
# if ($host = "cuxiao.test.yoho.cn" ) {
|
|
|
# proxy_redirect off;
|
|
|
# proxy_pass http://101.201.176.121;
|
|
|
# proxy_set_header Host cuxiao.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 ~* \.html$ {
|
|
|
root /Data/code/git/yohobuy/assets;
|
|
|
if (!-f $request_filename){
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
}
|
|
|
expires 3m;
|
|
|
}
|
|
|
|
|
|
#location ~* \.html$ {
|
|
|
# root /Data/code/git/yohobuy/assets;
|
|
|
# if (!-f $request_filename){
|
|
|
# rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
# }
|
|
|
# expires 3m;
|
|
|
# }
|
|
|
|
|
|
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
|
|
|
expires 30d;
|
...
|
...
|
|