Showing
5 changed files
with
371 additions
and
85 deletions
@@ -222,8 +222,3 @@ | @@ -222,8 +222,3 @@ | ||
222 | location =/brand/index/about{ | 222 | location =/brand/index/about{ |
223 | return 301 https://$host$request_uri; | 223 | return 301 https://$host$request_uri; |
224 | } | 224 | } |
225 | - | ||
226 | - # product detail page 301 redirect to item use https | ||
227 | - location ^~ /product/pro_ { | ||
228 | - return 301 https://item.m.yohobuy.com$request_uri; | ||
229 | - } |
1 | + # idc old proxy | ||
2 | + location =/invite.html { | ||
3 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
4 | + proxy_redirect off; | ||
5 | + proxy_pass http://yohobuy_idc; | ||
6 | + proxy_set_header Host m.yohobuy.com; | ||
7 | + proxy_set_header X-Real-IP $remote_addr; | ||
8 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
9 | + proxy_set_header Accept-Encoding "gzip"; | ||
10 | + } | ||
11 | + location =/app.html { | ||
12 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
13 | + proxy_redirect off; | ||
14 | + proxy_pass http://yohobuy_idc; | ||
15 | + proxy_set_header Host m.yohobuy.com; | ||
16 | + proxy_set_header X-Real-IP $remote_addr; | ||
17 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
18 | + proxy_set_header Accept-Encoding "gzip"; | ||
19 | + } | ||
20 | + location =/yohood.html { | ||
21 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
22 | + proxy_redirect off; | ||
23 | + proxy_pass http://yohobuy_idc; | ||
24 | + proxy_set_header Host m.yohobuy.com; | ||
25 | + proxy_set_header X-Real-IP $remote_addr; | ||
26 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
27 | + proxy_set_header Accept-Encoding "gzip"; | ||
28 | + } | ||
29 | + location ^~ /home/lottery { | ||
30 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
31 | + proxy_redirect off; | ||
32 | + proxy_pass http://yohobuy_idc; | ||
33 | + proxy_set_header Host m.yohobuy.com; | ||
34 | + proxy_set_header X-Real-IP $remote_addr; | ||
35 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
36 | + proxy_set_header Accept-Encoding "gzip"; | ||
37 | + } | ||
38 | + location ^~ /home/redenvelopes { | ||
39 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
40 | + proxy_redirect off; | ||
41 | + proxy_pass http://yohobuy_idc; | ||
42 | + proxy_set_header Host m.yohobuy.com; | ||
43 | + proxy_set_header X-Real-IP $remote_addr; | ||
44 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
45 | + proxy_set_header Accept-Encoding "gzip"; | ||
46 | + } | ||
47 | + location ^~ /home/orders/tickets { | ||
48 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
49 | + proxy_redirect off; | ||
50 | + proxy_pass http://yohobuy_idc; | ||
51 | + proxy_set_header Host m.yohobuy.com; | ||
52 | + proxy_set_header X-Real-IP $remote_addr; | ||
53 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
54 | + proxy_set_header Accept-Encoding "gzip"; | ||
55 | + } | ||
56 | + location ^~ /home/currency/ { | ||
57 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
58 | + proxy_redirect off; | ||
59 | + proxy_pass http://yohobuy_idc; | ||
60 | + proxy_set_header Host m.yohobuy.com; | ||
61 | + proxy_set_header X-Real-IP $remote_addr; | ||
62 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
63 | + proxy_set_header Accept-Encoding "gzip"; | ||
64 | + } | ||
65 | + location = /home/orders/cancel { | ||
66 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
67 | + proxy_redirect off; | ||
68 | + proxy_pass http://yohobuy_idc; | ||
69 | + proxy_set_header Host m.yohobuy.com; | ||
70 | + proxy_set_header X-Real-IP $remote_addr; | ||
71 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
72 | + proxy_set_header Accept-Encoding "gzip"; | ||
73 | + } | ||
74 | + location ^~ /wechat { | ||
75 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
76 | + proxy_redirect off; | ||
77 | + proxy_pass http://yohobuy_idc; | ||
78 | + proxy_set_header Host m.yohobuy.com; | ||
79 | + proxy_set_header X-Real-IP $remote_addr; | ||
80 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
81 | + proxy_set_header Accept-Encoding "gzip"; | ||
82 | + } | ||
83 | + location ^~ /huodong { | ||
84 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
85 | + proxy_redirect off; | ||
86 | + proxy_pass http://yohobuy_idc; | ||
87 | + proxy_set_header Host m.yohobuy.com; | ||
88 | + proxy_set_header X-Real-IP $remote_addr; | ||
89 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
90 | + proxy_set_header Accept-Encoding "gzip"; | ||
91 | + } | ||
92 | + location ^~ /download { | ||
93 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
94 | + proxy_redirect off; | ||
95 | + proxy_pass http://yohobuy_idc; | ||
96 | + proxy_set_header Host m.yohobuy.com; | ||
97 | + proxy_set_header X-Real-IP $remote_addr; | ||
98 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
99 | + proxy_set_header Accept-Encoding "gzip"; | ||
100 | + } | ||
101 | + location ^~ /events { | ||
102 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
103 | + proxy_redirect off; | ||
104 | + proxy_pass http://yohobuy_idc; | ||
105 | + proxy_set_header Host m.yohobuy.com; | ||
106 | + proxy_set_header X-Real-IP $remote_addr; | ||
107 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
108 | + proxy_set_header Accept-Encoding "gzip"; | ||
109 | + } | ||
110 | + location ^~ /appactive { | ||
111 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
112 | + proxy_redirect off; | ||
113 | + proxy_pass http://yohobuy_idc; | ||
114 | + proxy_set_header Host m.yohobuy.com; | ||
115 | + proxy_set_header X-Real-IP $remote_addr; | ||
116 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
117 | + proxy_set_header Accept-Encoding "gzip"; | ||
118 | + } | ||
119 | + location ^~ /cart/success { | ||
120 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
121 | + proxy_redirect off; | ||
122 | + proxy_pass http://yohobuy_idc; | ||
123 | + proxy_set_header Host m.yohobuy.com; | ||
124 | + proxy_set_header X-Real-IP $remote_addr; | ||
125 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
126 | + proxy_set_header Accept-Encoding "gzip"; | ||
127 | + } | ||
128 | + location ^~ /shopping/success { | ||
129 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
130 | + proxy_redirect off; | ||
131 | + proxy_pass http://yohobuy_idc; | ||
132 | + proxy_set_header Host m.yohobuy.com; | ||
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 ^~ /shopping/pay/aliwap { | ||
138 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
139 | + proxy_redirect off; | ||
140 | + proxy_pass http://yohobuy_idc; | ||
141 | + proxy_set_header Host m.yohobuy.com; | ||
142 | + proxy_set_header X-Real-IP $remote_addr; | ||
143 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
144 | + proxy_set_header Accept-Encoding "gzip"; | ||
145 | + } | ||
146 | + location = /shopping/pay/wechatwap { | ||
147 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
148 | + proxy_redirect off; | ||
149 | + proxy_pass http://yohobuy_idc; | ||
150 | + proxy_set_header Host m.yohobuy.com; | ||
151 | + proxy_set_header X-Real-IP $remote_addr; | ||
152 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
153 | + proxy_set_header Accept-Encoding "gzip"; | ||
154 | + } | ||
155 | + location ^~ /passport/syncsignin { | ||
156 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
157 | + proxy_redirect off; | ||
158 | + proxy_pass http://yohobuy_idc; | ||
159 | + proxy_set_header Host m.yohobuy.com; | ||
160 | + proxy_set_header X-Real-IP $remote_addr; | ||
161 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
162 | + proxy_set_header Accept-Encoding "gzip"; | ||
163 | + } | ||
164 | + | ||
165 | + location = /product/index/search { | ||
166 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
167 | + proxy_redirect off; | ||
168 | + proxy_pass http://yohobuy_idc; | ||
169 | + proxy_set_header Host m.yohobuy.com; | ||
170 | + proxy_set_header X-Real-IP $remote_addr; | ||
171 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
172 | + proxy_set_header Accept-Encoding "gzip"; | ||
173 | + } | ||
174 | + | ||
175 | + location ^~ /share_ { | ||
176 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
177 | + proxy_redirect off; | ||
178 | + proxy_pass http://yohobuy_idc; | ||
179 | + proxy_set_header Host m.yohobuy.com; | ||
180 | + proxy_set_header X-Real-IP $remote_addr; | ||
181 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
182 | + proxy_set_header Accept-Encoding "gzip"; | ||
183 | + } | ||
184 | + | ||
185 | + # idc old proxy for login to write memcache and cookie (if need?) | ||
186 | + location ^~ /Passport/session { | ||
187 | + access_log /Data/logs/access.m.yohobuy.com.log fenxi; | ||
188 | + proxy_redirect off; | ||
189 | + proxy_pass http://yohobuy_idc; | ||
190 | + proxy_set_header Host mapi.yohobuy.com; | ||
191 | + proxy_set_header X-Real-IP $remote_addr; | ||
192 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
193 | + proxy_set_header Accept-Encoding "gzip"; | ||
194 | + } | ||
195 | + | ||
196 | + location =/product/new/index { | ||
197 | + return 301 http://m.yohobuy.com/product/new; | ||
198 | + } | ||
199 | + | ||
200 | + | ||
201 | + #old idc | ||
202 | + location =/download/appsem { | ||
203 | + return 301 http://cdn.yoho.cn/huodong-web/appsem/appsem.html; | ||
204 | + } | ||
205 | + | ||
206 | + location =/app { | ||
207 | + return 301 http://www.yoho.cn; | ||
208 | + } | ||
209 | + | ||
210 | + location =/help.html { | ||
211 | + return 301 http://m.yohobuy.com/home/help; | ||
212 | + } | ||
213 | + | ||
214 | + location ^~ /trends_detail_ { | ||
215 | + return 301 http://guang.m.yohobuy.com; | ||
216 | + } | ||
217 | + | ||
218 | + #location =/about { | ||
219 | + # return 301 http://$host$request_uri; | ||
220 | + # } | ||
221 | + | ||
222 | + #location =/brand/index/about{ | ||
223 | + # return 301 http://$host$request_uri; | ||
224 | + # } |
1 | + | ||
2 | + #app show help page | ||
3 | + location =/help/shareorder.html { | ||
4 | + root /Data/PE/yohobuy_H5/assets; | ||
5 | + expires 7d; | ||
6 | + } | ||
7 | + | ||
8 | + | ||
9 | + # product detail page 301 redirect to item use https | ||
10 | + location ^~ /product/pro_ { | ||
11 | + return 301 https://item.m.yohobuy.com$request_uri; | ||
12 | + } | ||
13 | + | ||
14 | + location ^~ /shopping/pay/aliwapreturn { | ||
15 | + proxy_redirect off; | ||
16 | + proxy_pass http://yohobuy; | ||
17 | + proxy_set_header Host m.yohobuy.com; | ||
18 | + proxy_set_header X-Real-IP $remote_addr; | ||
19 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
20 | + proxy_set_header Accept-Encoding "gzip"; | ||
21 | + } | ||
22 | + | ||
23 | + location / { | ||
24 | + proxy_redirect off; | ||
25 | + proxy_pass http://yohobuy; | ||
26 | + proxy_set_header Host $host; | ||
27 | + proxy_set_header X-Real-IP $remote_addr; | ||
28 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
29 | + proxy_set_header Accept-Encoding "gzip"; | ||
30 | + } |
@@ -37,6 +37,15 @@ server | @@ -37,6 +37,15 @@ server | ||
37 | # proxy_set_header Accept-Encoding "gzip"; | 37 | # proxy_set_header Accept-Encoding "gzip"; |
38 | # } | 38 | # } |
39 | 39 | ||
40 | + location ^~ /coupon { | ||
41 | + proxy_redirect off; | ||
42 | + proxy_pass http://yohobuy; | ||
43 | + proxy_set_header Host $host; | ||
44 | + proxy_set_header X-Real-IP $remote_addr; | ||
45 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
46 | + proxy_set_header Accept-Encoding "gzip"; | ||
47 | + } | ||
48 | + | ||
40 | # others http 301 redirect https | 49 | # others http 301 redirect https |
41 | location / { | 50 | location / { |
42 | return 301 https://m.yohobuy.com$request_uri; | 51 | return 301 https://m.yohobuy.com$request_uri; |
@@ -57,12 +66,12 @@ server | @@ -57,12 +66,12 @@ server | ||
57 | access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; | 66 | access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; |
58 | error_log /Data/logs/error_wap.yohobuy.com.log warn; | 67 | error_log /Data/logs/error_wap.yohobuy.com.log warn; |
59 | 68 | ||
60 | - # https key | ||
61 | - include vhosts/location/yohobuywap_httpskey.conf; | ||
62 | # old idc | 69 | # old idc |
63 | include vhosts/location/yohobuywap_idc.conf; | 70 | include vhosts/location/yohobuywap_idc.conf; |
64 | # app | 71 | # app |
65 | include vhosts/location/yohobuywap_app.conf; | 72 | include vhosts/location/yohobuywap_app.conf; |
73 | + # php | ||
74 | + include vhosts/location/yohobuywap_php.conf; | ||
66 | # node | 75 | # node |
67 | include vhosts/location/yohobuywap_node.conf; | 76 | include vhosts/location/yohobuywap_node.conf; |
68 | # static file | 77 | # static file |
@@ -80,15 +89,6 @@ server | @@ -80,15 +89,6 @@ server | ||
80 | # return 301 http://$host$request_uri; | 89 | # return 301 http://$host$request_uri; |
81 | #} | 90 | #} |
82 | 91 | ||
83 | - location / { | ||
84 | - proxy_redirect off; | ||
85 | - proxy_pass http://yohobuy; | ||
86 | - proxy_set_header Host $host; | ||
87 | - proxy_set_header X-Real-IP $remote_addr; | ||
88 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
89 | - proxy_set_header Accept-Encoding "gzip"; | ||
90 | - } | ||
91 | - | ||
92 | } | 92 | } |
93 | 93 | ||
94 | server | 94 | server |
1 | server | 1 | server |
2 | { | 2 | { |
3 | - listen 80; | ||
4 | - server_name m.yohobuy.com; | 3 | + listen 80; |
4 | + server_name m.yohobuy.com nginx1.m.yohobuy.com; | ||
5 | 5 | ||
6 | - #ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem; | ||
7 | - #ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key; | ||
8 | - | ||
9 | - root /Data/PE/yohobuy_H5/yohobuy/m.yohobuy.com/public; | ||
10 | - | ||
11 | - access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; | ||
12 | - error_log /Data/logs/error_wap.yohobuy.com.log warn; | 6 | + access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; |
7 | + error_log /Data/logs/error_wap.yohobuy.com.log warn; | ||
13 | 8 | ||
14 | - # https key | ||
15 | - #include vhosts/location/yohobuywap_httpskey.conf; | ||
16 | - # old idc | ||
17 | - include vhosts/location/yohobuywap_idc.conf; | ||
18 | - # app | ||
19 | - include vhosts/location/yohobuywap_app.conf; | ||
20 | - # node | ||
21 | - include vhosts/location/yohobuywap_node.conf; | ||
22 | - # static file | ||
23 | - include vhosts/location/yohobuywap_static.conf; | 9 | + # app |
10 | + include vhosts/location/yohobuywap_app.conf; | ||
24 | 11 | ||
25 | #for wechat pay | 12 | #for wechat pay |
26 | location ^~ /home/orders/pay { | 13 | location ^~ /home/orders/pay { |
@@ -41,36 +28,118 @@ server | @@ -41,36 +28,118 @@ server | ||
41 | proxy_set_header Accept-Encoding "gzip"; | 28 | proxy_set_header Accept-Encoding "gzip"; |
42 | } | 29 | } |
43 | 30 | ||
44 | - location =/shopping/pay/aliwapreturn { | 31 | + # location =/shopping/pay/aliwapreturn { |
32 | + # proxy_redirect off; | ||
33 | + # proxy_pass http://yohobuy_idc; | ||
34 | + # proxy_set_header Host $host; | ||
35 | + # proxy_set_header X-Real-IP $remote_addr; | ||
36 | + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
37 | + # proxy_set_header Accept-Encoding "gzip"; | ||
38 | + # } | ||
39 | + | ||
40 | + location ^~ /coupon { | ||
41 | + proxy_redirect off; | ||
42 | + proxy_pass http://yohobuy; | ||
43 | + proxy_set_header Host $host; | ||
44 | + proxy_set_header X-Real-IP $remote_addr; | ||
45 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
46 | + proxy_set_header Accept-Encoding "gzip"; | ||
47 | + } | ||
48 | + | ||
49 | + # others http 301 redirect https | ||
50 | + location / { | ||
51 | + return 301 https://m.yohobuy.com$request_uri; | ||
52 | + } | ||
53 | +} | ||
54 | + | ||
55 | + | ||
56 | +server | ||
57 | +{ | ||
58 | + listen 443; | ||
59 | + server_name m.yohobuy.com; | ||
60 | + | ||
61 | + ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem; | ||
62 | + ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key; | ||
63 | + | ||
64 | + root /Data/PE/yohobuy_H5/yohobuy/m.yohobuy.com/public; | ||
65 | + | ||
66 | + access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; | ||
67 | + error_log /Data/logs/error_wap.yohobuy.com.log warn; | ||
68 | + | ||
69 | + # old idc | ||
70 | + include vhosts/location/yohobuywap_idc_nohttps.conf; | ||
71 | + # app | ||
72 | + include vhosts/location/yohobuywap_app.conf; | ||
73 | + # php | ||
74 | + include vhosts/location/yohobuywap_php.conf; | ||
75 | + # node | ||
76 | + include vhosts/location/yohobuywap_node.conf; | ||
77 | + # static file | ||
78 | + include vhosts/location/yohobuywap_static.conf; | ||
79 | + | ||
80 | + #for wechat pay | ||
81 | + location ^~ /home/orders/pay { | ||
45 | proxy_redirect off; | 82 | proxy_redirect off; |
46 | - proxy_pass http://yohobuy_idc; | 83 | + proxy_pass http://yohobuy; |
47 | proxy_set_header Host $host; | 84 | proxy_set_header Host $host; |
48 | proxy_set_header X-Real-IP $remote_addr; | 85 | proxy_set_header X-Real-IP $remote_addr; |
49 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | 86 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
50 | proxy_set_header Accept-Encoding "gzip"; | 87 | proxy_set_header Accept-Encoding "gzip"; |
51 | } | 88 | } |
52 | 89 | ||
53 | - location / { | ||
54 | - proxy_redirect off; | ||
55 | - proxy_pass http://yohobuy; | ||
56 | - proxy_set_header Host $host; | ||
57 | - proxy_set_header X-Real-IP $remote_addr; | ||
58 | - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
59 | - proxy_set_header Accept-Encoding "gzip"; | ||
60 | - } | 90 | + location ^~ /shopping/pay/wechatwapapi { |
91 | + proxy_redirect off; | ||
92 | + proxy_pass http://yohobuy; | ||
93 | + proxy_set_header Host $host; | ||
94 | + proxy_set_header X-Real-IP $remote_addr; | ||
95 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
96 | + proxy_set_header Accept-Encoding "gzip"; | ||
97 | + } | ||
98 | + | ||
99 | + # location =/shopping/pay/aliwapreturn { | ||
100 | + # proxy_redirect off; | ||
101 | + # proxy_pass http://yohobuy_idc; | ||
102 | + # proxy_set_header Host $host; | ||
103 | + # proxy_set_header X-Real-IP $remote_addr; | ||
104 | + # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
105 | + # proxy_set_header Accept-Encoding "gzip"; | ||
106 | + # } | ||
107 | + | ||
108 | + location ^~ /coupon { | ||
109 | + proxy_redirect off; | ||
110 | + proxy_pass http://yohobuy; | ||
111 | + proxy_set_header Host $host; | ||
112 | + proxy_set_header X-Real-IP $remote_addr; | ||
113 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
114 | + proxy_set_header Accept-Encoding "gzip"; | ||
115 | + } | ||
61 | 116 | ||
62 | } | 117 | } |
63 | 118 | ||
64 | server | 119 | server |
65 | { | 120 | { |
66 | - listen 80; | 121 | + listen 80; |
122 | + server_name *.m.yohobuy.com; | ||
123 | + | ||
124 | + access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; | ||
125 | + error_log /Data/logs/error_wap.yohobuy.com.log warn; | ||
126 | + | ||
127 | + # others http 301 redirect https | ||
128 | + location / { | ||
129 | + return 301 https://$host$request_uri; | ||
130 | + } | ||
131 | +} | ||
132 | + | ||
133 | +server | ||
134 | +{ | ||
135 | + listen 443; | ||
67 | server_name *.m.yohobuy.com; | 136 | server_name *.m.yohobuy.com; |
68 | 137 | ||
69 | - #ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; | ||
70 | - #ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; | 138 | + ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; |
139 | + ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; | ||
71 | 140 | ||
72 | # https key | 141 | # https key |
73 | - #include vhosts/location/yohobuywap_httpskey.conf; | 142 | + include vhosts/location/yohobuywap_httpskey.conf; |
74 | 143 | ||
75 | 144 | ||
76 | access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; | 145 | access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; |
@@ -132,14 +201,14 @@ server | @@ -132,14 +201,14 @@ server | ||
132 | 201 | ||
133 | server | 202 | server |
134 | { | 203 | { |
135 | - listen 80; | 204 | + listen 443; |
136 | server_name analytics.m.yohobuy.com; | 205 | server_name analytics.m.yohobuy.com; |
137 | 206 | ||
138 | - #ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; | ||
139 | - #ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; | 207 | + ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; |
208 | + ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; | ||
140 | 209 | ||
141 | # https key | 210 | # https key |
142 | - #include vhosts/location/yohobuywap_httpskey.conf; | 211 | + include vhosts/location/yohobuywap_httpskey.conf; |
143 | 212 | ||
144 | location / { | 213 | location / { |
145 | proxy_redirect off; | 214 | proxy_redirect off; |
@@ -150,36 +219,4 @@ server | @@ -150,36 +219,4 @@ server | ||
150 | proxy_set_header Accept-Encoding "gzip"; | 219 | proxy_set_header Accept-Encoding "gzip"; |
151 | } | 220 | } |
152 | 221 | ||
153 | -} | ||
154 | - | ||
155 | -server | ||
156 | -{ | ||
157 | - listen 443; | ||
158 | - server_name m.yohobuy.com; | ||
159 | - | ||
160 | - ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem; | ||
161 | - ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key; | ||
162 | - | ||
163 | - # https key | ||
164 | - include vhosts/location/yohobuywap_httpskey.conf; | ||
165 | - | ||
166 | - location / { | ||
167 | - return 301 http://$host$request_uri; | ||
168 | - } | ||
169 | -} | ||
170 | - | ||
171 | -server | ||
172 | -{ | ||
173 | - listen 443; | ||
174 | - server_name *.m.yohobuy.com; | ||
175 | - | ||
176 | - ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; | ||
177 | - ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; | ||
178 | - | ||
179 | - # https key | ||
180 | - include vhosts/location/yohobuywap_httpskey.conf; | ||
181 | - | ||
182 | - location / { | ||
183 | - return 301 http://$host$request_uri; | ||
184 | - } | ||
185 | } | 222 | } |
-
Please register or login to post a comment