...
|
...
|
@@ -17,33 +17,71 @@ server |
|
|
allow 172.16.0.0/16;
|
|
|
deny all;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 子域名
|
|
|
if ($host = "sale.test.yoho.cn" ) {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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" ) {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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 =/signin.html {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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 /passport/auth {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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 /passport/signin {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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 {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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 /cart {
|
|
|
rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
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 ~* \.html$ {
|
...
|
...
|
|