|
@@ -17,65 +17,203 @@ server |
|
@@ -17,65 +17,203 @@ server |
17
|
allow 172.16.0.0/16;
|
17
|
allow 172.16.0.0/16;
|
18
|
deny all;
|
18
|
deny all;
|
19
|
|
19
|
|
20
|
-
|
20
|
+ #账号相关
|
|
|
21
|
+ location = /reg.html {
|
|
|
22
|
+ root /Data/code/git/yohobuy/assets;
|
|
|
23
|
+ expires 7d;
|
|
|
24
|
+ }
|
|
|
25
|
+ location = /emailback.html {
|
|
|
26
|
+ root /Data/code/git/yohobuy/assets;
|
|
|
27
|
+ expires 7d;
|
|
|
28
|
+ }
|
|
|
29
|
+ location = /phoneback.html {
|
|
|
30
|
+ root /Data/code/git/yohobuy/assets;
|
|
|
31
|
+ expires 7d;
|
|
|
32
|
+ }
|
|
|
33
|
+ location = /error.html {
|
|
|
34
|
+ root /Data/code/git/yohobuy/assets;
|
|
|
35
|
+ expires 7d;
|
|
|
36
|
+ }
|
|
|
37
|
+ location ^~ /passport/back/ {
|
|
|
38
|
+ proxy_redirect off;
|
|
|
39
|
+ proxy_pass http://yohobuy;
|
|
|
40
|
+ proxy_set_header Host $host;
|
|
|
41
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
42
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
43
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
44
|
+ }
|
|
|
45
|
+ location ^~ /passport/reg/ {
|
|
|
46
|
+ proxy_redirect off;
|
|
|
47
|
+ proxy_pass http://yohobuy;
|
|
|
48
|
+ proxy_set_header Host $host;
|
|
|
49
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
50
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
51
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
52
|
+ }
|
21
|
|
53
|
|
|
|
54
|
+ #首页相关
|
|
|
55
|
+ location = / {
|
|
|
56
|
+ proxy_redirect off;
|
|
|
57
|
+ proxy_pass http://yohobuy;
|
|
|
58
|
+ proxy_set_header Host $host;
|
|
|
59
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
60
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
61
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
62
|
+ }
|
|
|
63
|
+ location = /boys {
|
|
|
64
|
+ proxy_redirect off;
|
|
|
65
|
+ proxy_pass http://yohobuy;
|
|
|
66
|
+ proxy_set_header Host $host;
|
|
|
67
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
68
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
69
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
70
|
+ }
|
|
|
71
|
+ location = /girls {
|
|
|
72
|
+ proxy_redirect off;
|
|
|
73
|
+ proxy_pass http://yohobuy;
|
|
|
74
|
+ proxy_set_header Host $host;
|
|
|
75
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
76
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
77
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
78
|
+ }
|
|
|
79
|
+ location = /kids {
|
|
|
80
|
+ proxy_redirect off;
|
|
|
81
|
+ proxy_pass http://yohobuy;
|
|
|
82
|
+ proxy_set_header Host $host;
|
|
|
83
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
84
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
85
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
86
|
+ }
|
|
|
87
|
+ location = /lifestyle {
|
|
|
88
|
+ proxy_redirect off;
|
|
|
89
|
+ proxy_pass http://yohobuy;
|
|
|
90
|
+ proxy_set_header Host $host;
|
|
|
91
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
92
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
93
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
94
|
+ }
|
|
|
95
|
+ location = /girl {
|
|
|
96
|
+ proxy_redirect off;
|
|
|
97
|
+ proxy_pass http://yohobuy;
|
|
|
98
|
+ proxy_set_header Host $host;
|
|
|
99
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
100
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
101
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
102
|
+ }
|
|
|
103
|
+
|
|
|
104
|
+ # 商品相关
|
|
|
105
|
+ location = /cate {
|
|
|
106
|
+ proxy_redirect off;
|
|
|
107
|
+ proxy_pass http://yohobuy;
|
|
|
108
|
+ proxy_set_header Host $host;
|
|
|
109
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
110
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
111
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
112
|
+ }
|
|
|
113
|
+ location = /brands {
|
|
|
114
|
+ proxy_redirect off;
|
|
|
115
|
+ proxy_pass http://yohobuy;
|
|
|
116
|
+ proxy_set_header Host $host;
|
|
|
117
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
118
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
119
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
120
|
+ }
|
|
|
121
|
+ location = /sale {
|
|
|
122
|
+ proxy_redirect off;
|
|
|
123
|
+ proxy_pass http://yohobuy;
|
|
|
124
|
+ proxy_set_header Host $host;
|
|
|
125
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
126
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
127
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
128
|
+ }
|
|
|
129
|
+ location = /brands/search {
|
|
|
130
|
+ proxy_redirect off;
|
|
|
131
|
+ proxy_pass http://yohobuy;
|
|
|
132
|
+ proxy_set_header Host $host;
|
|
|
133
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
134
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
135
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
136
|
+ }
|
|
|
137
|
+ location = /product/new {
|
|
|
138
|
+ proxy_redirect off;
|
|
|
139
|
+ proxy_pass http://yohobuy;
|
|
|
140
|
+ proxy_set_header Host $host;
|
|
|
141
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
142
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
143
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
144
|
+ }
|
22
|
|
145
|
|
23
|
- # 子域名
|
|
|
24
|
- if ($host = "sale.test.yoho.cn" ) {
|
146
|
+ location ^~ /product/newsale/ {
|
|
|
147
|
+ proxy_redirect off;
|
|
|
148
|
+ proxy_pass http://yohobuy;
|
|
|
149
|
+ proxy_set_header Host $host;
|
|
|
150
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
151
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
152
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
153
|
+ }
|
|
|
154
|
+ location ^~ /product/opt/ {
|
25
|
proxy_redirect off;
|
155
|
proxy_redirect off;
|
26
|
- proxy_pass http://61.155.222.162;
|
|
|
27
|
- proxy_set_header Host cuxiao.m.yohobuy.com;
|
156
|
+ proxy_pass http://yohobuy;
|
|
|
157
|
+ proxy_set_header Host $host;
|
28
|
proxy_set_header X-Real-IP $remote_addr;
|
158
|
proxy_set_header X-Real-IP $remote_addr;
|
29
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
159
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
30
|
proxy_set_header Accept-Encoding "gzip";
|
160
|
proxy_set_header Accept-Encoding "gzip";
|
31
|
}
|
161
|
}
|
32
|
- if ($host = "cuxiao.test.yoho.cn" ) {
|
162
|
+ location ^~ /product/recom/ {
|
33
|
proxy_redirect off;
|
163
|
proxy_redirect off;
|
34
|
- proxy_pass http://101.201.176.121;
|
|
|
35
|
- proxy_set_header Host cuxiao.m.yohobuy.com;
|
164
|
+ proxy_pass http://yohobuy;
|
|
|
165
|
+ proxy_set_header Host $host;
|
36
|
proxy_set_header X-Real-IP $remote_addr;
|
166
|
proxy_set_header X-Real-IP $remote_addr;
|
37
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
167
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
38
|
proxy_set_header Accept-Encoding "gzip";
|
168
|
proxy_set_header Accept-Encoding "gzip";
|
39
|
}
|
169
|
}
|
40
|
|
170
|
|
41
|
- # 账号相关
|
|
|
42
|
- location =/signin.html {
|
171
|
+ # 逛相关
|
|
|
172
|
+ location ^~ /guang/ {
|
43
|
proxy_redirect off;
|
173
|
proxy_redirect off;
|
44
|
- proxy_pass http://61.155.222.163;
|
|
|
45
|
- proxy_set_header Host m.yohobuy.com;
|
174
|
+ proxy_pass http://yohobuy;
|
|
|
175
|
+ proxy_set_header Host $host;
|
46
|
proxy_set_header X-Real-IP $remote_addr;
|
176
|
proxy_set_header X-Real-IP $remote_addr;
|
47
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
177
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
48
|
proxy_set_header Accept-Encoding "gzip";
|
178
|
proxy_set_header Accept-Encoding "gzip";
|
49
|
}
|
179
|
}
|
50
|
- location /passport/auth {
|
180
|
+ location ^~ /tags/index {
|
51
|
proxy_redirect off;
|
181
|
proxy_redirect off;
|
52
|
- proxy_pass http://61.155.222.163;
|
|
|
53
|
- proxy_set_header Host m.yohobuy.com;
|
182
|
+ proxy_pass http://yohobuy;
|
|
|
183
|
+ proxy_set_header Host $host;
|
54
|
proxy_set_header X-Real-IP $remote_addr;
|
184
|
proxy_set_header X-Real-IP $remote_addr;
|
55
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
185
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
56
|
proxy_set_header Accept-Encoding "gzip";
|
186
|
proxy_set_header Accept-Encoding "gzip";
|
57
|
}
|
187
|
}
|
58
|
- location /passport/signin {
|
188
|
+ location ^~ /author/index {
|
59
|
proxy_redirect off;
|
189
|
proxy_redirect off;
|
60
|
- proxy_pass http://61.155.222.163;
|
|
|
61
|
- proxy_set_header Host m.yohobuy.com;
|
190
|
+ proxy_pass http://yohobuy;
|
|
|
191
|
+ proxy_set_header Host $host;
|
|
|
192
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
193
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
194
|
+ proxy_set_header Accept-Encoding "gzip";
|
|
|
195
|
+ }
|
|
|
196
|
+ location ^~ /info/index {
|
|
|
197
|
+ proxy_redirect off;
|
|
|
198
|
+ proxy_pass http://yohobuy;
|
|
|
199
|
+ proxy_set_header Host $host;
|
62
|
proxy_set_header X-Real-IP $remote_addr;
|
200
|
proxy_set_header X-Real-IP $remote_addr;
|
63
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
201
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
64
|
proxy_set_header Accept-Encoding "gzip";
|
202
|
proxy_set_header Accept-Encoding "gzip";
|
65
|
}
|
203
|
}
|
66
|
|
204
|
|
67
|
- # 个人中心
|
|
|
68
|
- location /home {
|
205
|
+ # 搜索相关
|
|
|
206
|
+ location ^~ /search {
|
69
|
proxy_redirect off;
|
207
|
proxy_redirect off;
|
70
|
- proxy_pass http://61.155.222.163;
|
|
|
71
|
- proxy_set_header Host m.yohobuy.com;
|
208
|
+ proxy_pass http://yohobuy;
|
|
|
209
|
+ proxy_set_header Host $host;
|
72
|
proxy_set_header X-Real-IP $remote_addr;
|
210
|
proxy_set_header X-Real-IP $remote_addr;
|
73
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
211
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
74
|
proxy_set_header Accept-Encoding "gzip";
|
212
|
proxy_set_header Accept-Encoding "gzip";
|
75
|
}
|
213
|
}
|
76
|
-
|
|
|
77
|
- # 购物车
|
|
|
78
|
- location /cart {
|
214
|
+
|
|
|
215
|
+ # 其它访问都跳到老版
|
|
|
216
|
+ location / {
|
79
|
proxy_redirect off;
|
217
|
proxy_redirect off;
|
80
|
proxy_pass http://61.155.222.163;
|
218
|
proxy_pass http://61.155.222.163;
|
81
|
proxy_set_header Host m.yohobuy.com;
|
219
|
proxy_set_header Host m.yohobuy.com;
|
|
@@ -83,14 +221,33 @@ server |
|
@@ -83,14 +221,33 @@ server |
83
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
221
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
84
|
proxy_set_header Accept-Encoding "gzip";
|
222
|
proxy_set_header Accept-Encoding "gzip";
|
85
|
}
|
223
|
}
|
|
|
224
|
+
|
|
|
225
|
+# # 子域名
|
|
|
226
|
+# if ($host = "sale.test.yoho.cn" ) {
|
|
|
227
|
+# proxy_redirect off;
|
|
|
228
|
+# proxy_pass http://61.155.222.162;
|
|
|
229
|
+# proxy_set_header Host cuxiao.m.yohobuy.com;
|
|
|
230
|
+# proxy_set_header X-Real-IP $remote_addr;
|
|
|
231
|
+# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
232
|
+# proxy_set_header Accept-Encoding "gzip";
|
|
|
233
|
+# }
|
|
|
234
|
+# if ($host = "cuxiao.test.yoho.cn" ) {
|
|
|
235
|
+# proxy_redirect off;
|
|
|
236
|
+# proxy_pass http://101.201.176.121;
|
|
|
237
|
+# proxy_set_header Host cuxiao.m.yohobuy.com;
|
|
|
238
|
+# proxy_set_header X-Real-IP $remote_addr;
|
|
|
239
|
+# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
240
|
+# proxy_set_header Accept-Encoding "gzip";
|
|
|
241
|
+# }
|
86
|
|
242
|
|
87
|
- location ~* \.html$ {
|
|
|
88
|
- root /Data/code/git/yohobuy/assets;
|
|
|
89
|
- if (!-f $request_filename){
|
|
|
90
|
- rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
91
|
- }
|
|
|
92
|
- expires 3m;
|
|
|
93
|
- }
|
243
|
+
|
|
|
244
|
+ #location ~* \.html$ {
|
|
|
245
|
+# root /Data/code/git/yohobuy/assets;
|
|
|
246
|
+# if (!-f $request_filename){
|
|
|
247
|
+# rewrite ^/(.*)$ http://m.yohobuy.com/$1 permanent;
|
|
|
248
|
+# }
|
|
|
249
|
+# expires 3m;
|
|
|
250
|
+# }
|
94
|
|
251
|
|
95
|
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
|
252
|
location ~* \.(ico|woff|svg|eot|ttf|otf)$ {
|
96
|
expires 30d;
|
253
|
expires 30d;
|