Authored by 梁志锋

优化nginx文件

1 -<?php  
2 -  
3 -/**  
4 - * 有货相关接口类  
5 - *  
6 - * @name Yohobuy  
7 - * @package library/Api  
8 - * @copyright yoho.inc  
9 - * @version 1.0 (2015-9-30 16:42:51)  
10 - * @author fei.hong <fei.hong@yoho.cn>  
11 - */  
12 -  
13 -namespace Api;  
14 -  
15 -use Plugin\Cache;  
16 -  
17 -class YohobuyH5  
18 -{  
19 - /* 正式环境 */  
20 - // php API  
21 -// const API_URL = 'http://api2.open.yohobuy.com/';  
22 -// const API_URL2 = 'http://api.open.yohobuy.com/';  
23 -// const SERVICE_URL = 'http://service.api.yohobuy.com/';  
24 -// const YOHOBUY_URL = 'http://www.yohobuy.com/';  
25 -  
26 - //java API  
27 - const API_URL = 'http://apih5.yoho.cn/';  
28 - const API_URL2 = 'http://apih5.yoho.cn/';  
29 - const SERVICE_URL = 'http://serviceh5.yoho.cn/';  
30 - const YOHOBUY_URL = 'http://www.yohobuy.com/';  
31 - const API_OLD = 'http://api2.open.yohobuy.com/';  
32 -  
33 - /* 测试环境 */  
34 -// const API_URL = 'http://testapi.yoho.cn:28078/'; // 'http://192.168.102.205:8080/gateway/'  
35 -// const SERVICE_URL = 'http://testservice.yoho.cn:28077/';  
36 -// const YOHOBUY_URL = 'http://www.yohobuy.com/';  
37 -// const API_OLD = 'http://test2.open.yohobuy.com/';  
38 -  
39 - /* 预览环境 */  
40 -// const API_URL = 'http://preapi.yoho.cn/';  
41 -// const API_URL2 = 'http://preapi.yoho.cn/';  
42 -// const SERVICE_URL = 'http://preservice.yoho.cn/';  
43 -// const YOHOBUY_URL = 'http://www.yohobuy.com/';  
44 -// const API_OLD = 'http://api2.open.yohobuy.com/';  
45 -  
46 - /**  
47 - * 私钥列表  
48 - *  
49 - * @var array  
50 - */  
51 - public static $privateKeyList = array(  
52 - 'android' => 'fd4ad5fcfa0de589ef238c0e7331b585',  
53 - 'iphone' => 'a85bb0674e08986c6b115d5e3a4884fa',  
54 - 'ipad' => 'ad9fcda2e679cf9229e37feae2cdcf80',  
55 - 'web' => '0ed29744ed318fd28d2c07985d3ba633',  
56 - );  
57 -  
58 - /**  
59 - * 取得当前的客户端类型  
60 - */  
61 - public static function clientType()  
62 - {  
63 - // 苹果设备  
64 - if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone')) {  
65 - return 'iphone';  
66 - }  
67 - // 苹果IPAD  
68 - elseif (strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {  
69 - return 'ipad';  
70 - }  
71 - elseif (stristr($_SERVER['HTTP_USER_AGENT'], 'android')) {  
72 - return 'android';  
73 - }  
74 - // 其它  
75 - else {  
76 - return 'android';  
77 - }  
78 - }  
79 -  
80 - /**  
81 - * 取得当前的IP地址  
82 - *  
83 - * @param bool $int 返回int类型的ip地址,默认是  
84 - * @return mixed 当前的IP地址  
85 - */  
86 - public static function ip($int = true)  
87 - {  
88 - if (isset($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP']) {  
89 - $onlineip = $_SERVER['HTTP_CLIENT_IP'];  
90 - } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']) {  
91 - $onlineip = $_SERVER['HTTP_X_FORWARDED_FOR'];  
92 - } else {  
93 - $onlineip = $_SERVER['REMOTE_ADDR'];  
94 - }  
95 -  
96 - return $int ? ip2long($onlineip) : $onlineip;  
97 - }  
98 -  
99 - /**  
100 - * 取得公共的参数  
101 - *  
102 - * @return array  
103 - */  
104 - public static function param()  
105 - {  
106 - $clientType = self::clientType();  
107 - $param = array(  
108 - 'app_version' => '3.8.2',  
109 - 'client_type' => $clientType,  
110 - 'os_version' => 'yohobuy:h5',  
111 - 'private_key' => self::$privateKeyList[$clientType],  
112 - 'screen_size' => '720x1280',  
113 - 'v' => '7',  
114 - );  
115 - return $param;  
116 - }  
117 -  
118 - /**  
119 - * 构建URL  
120 - *  
121 - * @param string $url  
122 - * @param array $data  
123 - * @return string  
124 - */  
125 - public static function httpBuildQuery($url, $data)  
126 - {  
127 - // 销毁私钥参数  
128 - if (isset($data['private_key'])) {  
129 - unset($data['private_key']);  
130 - }  
131 - if (strstr($url, '?') !== false) {  
132 - $url .= '&' . http_build_query($data, null, '&');  
133 - } else {  
134 - $url .= '?' . http_build_query($data, null, '&');  
135 - }  
136 - return $url;  
137 - }  
138 -  
139 - /**  
140 - * get方式调用接口  
141 - *  
142 - * @param string $url 接口URL  
143 - * @param array $data 参数列表  
144 - * @parma mixed $cache 控制是否启用接口数据的缓存(时间单位为秒). 如3600表示缓存1小时, false表示不缓存  
145 - * @param bool $returnJson 控制是否返回json格式数据  
146 - * @param int $timeout 超时时间  
147 - * @return mixed  
148 - */  
149 - public static function get($url, $data = array(), $cache = false, $returnJson = false, $timeout = 5)  
150 - {  
151 - // 销毁私钥参数  
152 - if (isset($data['private_key'])) {  
153 - unset($data['private_key']);  
154 - }  
155 - if (!empty($data)) {  
156 - $url = self::httpBuildQuery($url, $data);  
157 - }  
158 - /* 开启缓存的情况 */  
159 - if ($cache && USE_CACHE) {  
160 - // 先尝试获取一级缓存(master), 有数据则直接返回.  
161 - $result = Cache::get($url, 'master');  
162 - if (!empty($result)) {  
163 - return $result;  
164 - }  
165 - }  
166 -  
167 - $ch = curl_init($url);  
168 - curl_setopt($ch, CURLOPT_HEADER, 0);  
169 - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);  
170 - //curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);  
171 - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  
172 - $result = curl_exec($ch);  
173 - if (!$returnJson && !empty($result)) {  
174 - $result = json_decode($result, true);  
175 - }  
176 -  
177 - curl_close($ch);  
178 - $data = array();  
179 -  
180 - /* 开启缓存的情况 */  
181 - if ($cache && USE_CACHE) {  
182 - // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.  
183 - if (empty($result)) {  
184 - $result = Cache::get($url, 'slave');  
185 - }  
186 - // 接口调用成功时,这里会设置一级(master)和二级(slave)的缓存数据.  
187 - else {  
188 - Cache::set($url, $result, $cache);  
189 - }  
190 - }  
191 -  
192 - return $result;  
193 - }  
194 -  
195 - /**  
196 - * post提交数据  
197 - *  
198 - * @param string $url 接口URL  
199 - * @param array $data 参数列表  
200 - * @param bool $returnJson 控制是否返回json格式数据  
201 - * @param int $timeout 超时时间  
202 - * @param array $header  
203 - * @param array $cookie  
204 - * @return mixed  
205 - */  
206 - public static function post($url, $data = array(), $returnJson = false, $timeout = 10, $header = array(), $cookie = array())  
207 - {  
208 - $ch = curl_init($url);  
209 -  
210 - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);  
211 - if (!empty($header)) {  
212 - curl_setopt($ch, CURLOPT_HTTPHEADER, $header);  
213 - } else {  
214 - curl_setopt($ch, CURLOPT_HEADER, 0);  
215 - }  
216 -  
217 - if (!empty($cookie)) {  
218 - $cookie_str = array();  
219 - foreach ($cookie as $key => $val) {  
220 - $cookie_str[] = urlencode($key) . '=' . urlencode($val);  
221 - }  
222 - curl_setopt($ch, CURLOPT_COOKIE, implode(';', $cookie_str));  
223 - }  
224 - curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 YOHOWEB');  
225 - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  
226 - curl_setopt($ch, CURLOPT_POST, true);  
227 - // 销毁私钥参数  
228 - if (isset($data['private_key'])) {  
229 - unset($data['private_key']);  
230 - }  
231 - if (!empty($data)) {  
232 - $str = http_build_query($data, null, '&');  
233 - // 新加支持application/x-www-form-urlencoded调用方式  
234 - //curl_setopt($ch, CURLOPT_POSTFIELDS, $data);  
235 - curl_setopt($ch, CURLOPT_POSTFIELDS, $str);  
236 - }  
237 - $result = curl_exec($ch);  
238 - if (!$returnJson && !empty($result)) {  
239 - $result = json_decode($result, true);  
240 - }  
241 - curl_close($ch);  
242 - $data = array();  
243 -  
244 - return $result;  
245 - }  
246 -  
247 - /**  
248 - * 批量调用接口  
249 - *  
250 - * @param array $urlList 接口列表  
251 - * @param array $options CURL设置项  
252 - * @parma mixed $cache 控制是否启用接口数据的缓存(时间单位为秒). 如3600表示缓存1小时, false表示不缓存  
253 - * @param int $timeout 超时时间,单位是秒  
254 - * @return array  
255 - */  
256 - public static function getMulti($urlList = array(), $options = array(), $cache = false, $timeout = 5)  
257 - {  
258 - /* 开启缓存的情况 */  
259 - if ($cache && USE_CACHE) {  
260 - $key = md5(implode(',', array_values($urlList)));  
261 - // 先尝试获取一级缓存(master), 有数据则直接返回.  
262 - $result = Cache::get($key, 'master');  
263 - if (!empty($result)) {  
264 - return $result;  
265 - }  
266 - }  
267 -  
268 - $result = array();  
269 - $response = array();  
270 - $running = 0;  
271 - $data = '';  
272 - $error = '';  
273 - $defaultOptions = array(  
274 - CURLOPT_HEADER => 0,  
275 - CURLOPT_RETURNTRANSFER => 1,  
276 - CURLOPT_CONNECTTIMEOUT => $timeout,  
277 - CURLOPT_TIMEOUT => $timeout,  
278 - CURLOPT_NOSIGNAL => 1, //忽略所有的curl传递给php的信号,减少并发crash  
279 - );  
280 - $mh = curl_multi_init();  
281 - $ch = array();  
282 -  
283 - // 应用CURL配置  
284 - if (empty($options)) {  
285 - $options = $defaultOptions;  
286 - } else {  
287 - $options = array_merge($defaultOptions, $options);  
288 - }  
289 -  
290 - // 添加子链接句柄  
291 - foreach ($urlList as $name => $api) {  
292 - $ch[$name] = curl_init($api);  
293 - curl_setopt_array($ch[$name], $options);  
294 - curl_multi_add_handle($mh, $ch[$name]);  
295 - $result[$name] = array();  
296 - }  
297 -  
298 - // 调用API接口  
299 - do {  
300 - do {  
301 - $status = curl_multi_exec($mh, $running);  
302 - } while ($status == CURLM_CALL_MULTI_PERFORM);  
303 -  
304 - if ($status != CURLM_OK) {  
305 - break;  
306 - }  
307 -  
308 - if ($running > 0) {  
309 - curl_multi_select($mh, 0.5);  
310 - }  
311 - } while ($running);  
312 -  
313 - // 获取API接口响应的结果  
314 - foreach ($urlList as $name => $api) {  
315 - $error = curl_error($ch[$name]);  
316 - if ($error != '') {  
317 - continue;  
318 - }  
319 -  
320 - $data = curl_multi_getcontent($ch[$name]);  
321 - if (!$data) {  
322 - continue;  
323 - }  
324 -  
325 - $response = json_decode($data, true);  
326 - if (empty($response['data'])) {  
327 - continue;  
328 - }  
329 - $result[$name] = $response['data'];  
330 -  
331 - curl_multi_remove_handle($mh, $ch[$name]);  
332 - curl_close($ch[$name]);  
333 - }  
334 - curl_multi_close($mh);  
335 -  
336 - /* 开启缓存的情况 */  
337 - if ($cache && USE_CACHE) {  
338 - // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.  
339 - if (empty($result[$name])) {  
340 - $result = Cache::get($key, 'slave');  
341 - }  
342 - // 接口调用成功时,这里会设置一级(master)和二级(slave)的缓存数据.  
343 - else {  
344 - Cache::set($key, $result, $cache);  
345 - }  
346 - }  
347 -  
348 - return $result;  
349 - }  
350 -  
351 - /**  
352 - * rpc调用远程服务(YAR)  
353 - *  
354 - * @see http://php.net/manual/zh/yar-client.setopt.php  
355 - * @param string $uri  
356 - * @param string $method  
357 - * @param array $parameters  
358 - * @param mixed $cache 控制是否启用接口数据的缓存(时间单位为秒). 如3600表示缓存1小时, false表示不缓存  
359 - * @param int $timeout  
360 - * @return array  
361 - */  
362 - public static function yarClient($uri, $method, $parameters = array(), $cache = false, $timeout = 3000)  
363 - {  
364 - /* 开启缓存的情况 */  
365 - if ($cache && USE_CACHE) {  
366 - $key = self::httpBuildQuery($uri . $method, $parameters);  
367 - // 先尝试获取一级缓存(master), 有数据则直接返回.  
368 - $result = Cache::get($key, 'master');  
369 - if (!empty($result)) {  
370 - return $result;  
371 - }  
372 - }  
373 -  
374 - $client = new \Yar_Client($uri);  
375 - $client->SetOpt(YAR_OPT_PACKAGER, 'php');  
376 - $client->SetOpt(YAR_OPT_TIMEOUT, $timeout);  
377 - $client->SetOpt(YAR_OPT_CONNECT_TIMEOUT, $timeout);  
378 -  
379 - try {  
380 - $result = call_user_func_array(array($client, $method), $parameters);  
381 - } catch (\Exception $e) {  
382 - $result = array();  
383 - }  
384 -  
385 - /* 开启缓存的情况 */  
386 - if ($cache && USE_CACHE) {  
387 - // 接口调用异常时, 不害怕,从我们的二级缓存(slave)里再取数据.  
388 - if (empty($result)) {  
389 - $result = Cache::get($key, 'slave');  
390 - }  
391 - // 接口调用成功时,这里会设置一级(master)和二级(slave)的缓存数据.  
392 - else {  
393 - Cache::set($key, $result, $cache);  
394 - }  
395 - }  
396 -  
397 - return $result;  
398 - }  
399 -  
400 - /**  
401 - * 并行(异步)调用远程服务  
402 - *  
403 - * @see http://php.net/manual/zh/class.yar-concurrent-client.php  
404 - * @param string $uri  
405 - * @param string $method  
406 - * @param array $parameters  
407 - * @param callable $callback  
408 - * @param int $timeout  
409 - * @return void  
410 - */  
411 - public static function yarConcurrentCall($uri, $method, $parameters, $callback, $timeout = 3000)  
412 - {  
413 - \Yar_Concurrent_Client::call($uri, $method, $parameters, $callback, null, array(  
414 - YAR_OPT_PACKAGER => 'php',  
415 - YAR_OPT_TIMEOUT => $timeout,  
416 - YAR_OPT_CONNECT_TIMEOUT => $timeout  
417 - ));  
418 - }  
419 -  
420 - public static function yarConcurrentLoop($callback = null)  
421 - {  
422 - \Yar_Concurrent_Client::loop($callback);  
423 - }  
424 -  
425 - /**  
426 - * 提交json格式数据请求java有关接口  
427 - *  
428 - * @param string $url 接口URL  
429 - * @param array $data 参数列表  
430 - * @param bool $returnJson 控制是否返回json格式数据  
431 - * @param int $timeout 超时时间  
432 - * @param array $cookie  
433 - * @return mixed  
434 - */  
435 - public static function jsonPost($url, $data = array(), $returnJson = false, $timeout = 10, $cookie = array())  
436 - {  
437 - $ch = curl_init($url);  
438 -  
439 - curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);  
440 - curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');  
441 -  
442 - if (!empty($cookie)) {  
443 - $cookie_str = array();  
444 - foreach ($cookie as $key => $val) {  
445 - $cookie_str[] = urlencode($key) . '=' . urlencode($val);  
446 - }  
447 - curl_setopt($ch, CURLOPT_COOKIE, implode(';', $cookie_str));  
448 - }  
449 -  
450 - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);  
451 -  
452 - if (!empty($data)) {  
453 - $data_string = json_encode($data);  
454 -  
455 - curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);  
456 - // 设置json的Header  
457 - curl_setopt($ch, CURLOPT_HTTPHEADER, array(  
458 - 'Content-Type: application/json',  
459 - 'Content-Length: ' . strlen($data_string)  
460 - ));  
461 - }  
462 - $result = curl_exec($ch);  
463 - if (!$returnJson && !empty($result)) {  
464 - $result = json_decode($result, true);  
465 - }  
466 - curl_close($ch);  
467 - $data = array();  
468 -  
469 - return $result;  
470 - }  
471 -  
472 -}  
  1 + ssl on;
  2 + ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/dhparam.pem;
  3 +
  4 + ssl_prefer_server_ciphers on;
  5 + ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  6 + ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA";
  7 + ssl_session_tickets off;
  8 + ssl_session_cache shared:SSL:10m;
@@ -4,7 +4,7 @@ server @@ -4,7 +4,7 @@ server
4 server_name m.yohobuy.com nginx1.m.yohobuy.com; 4 server_name m.yohobuy.com nginx1.m.yohobuy.com;
5 5
6 access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; 6 access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
7 - error_log /Data/logs/error_wap.yohobuy.com.log warn; 7 + error_log /Data/logs/error_wap.yohobuy.com.log warn;
8 8
9 #for wechat pay 9 #for wechat pay
10 location ^~ /home/orders/pay { 10 location ^~ /home/orders/pay {
@@ -37,16 +37,11 @@ server @@ -37,16 +37,11 @@ server
37 listen 443; 37 listen 443;
38 server_name m.yohobuy.com; 38 server_name m.yohobuy.com;
39 39
40 - ssl on;  
41 ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem; 40 ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/yohobuy.pem;
42 ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key; 41 ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/yohobuy.key;
43 - ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/dhparam.pem;  
44 42
45 - ssl_prefer_server_ciphers on;  
46 - ssl_protocols TLSv1 TLSv1.1 TLSv1.2;  
47 - ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA";  
48 - ssl_session_tickets off;  
49 - ssl_session_cache shared:SSL:10m; 43 + # https key
  44 + include vhosts/location/yohobuywap_httpskey.conf;
50 45
51 root /Data/PE/yohobuy_H5/yohobuy/m.yohobuy.com/public; 46 root /Data/PE/yohobuy_H5/yohobuy/m.yohobuy.com/public;
52 47
@@ -93,16 +88,12 @@ server @@ -93,16 +88,12 @@ server
93 listen 443; 88 listen 443;
94 server_name *.m.yohobuy.com; 89 server_name *.m.yohobuy.com;
95 90
96 - ssl on;  
97 ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; 91 ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
98 ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; 92 ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
99 - ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/dhparam.pem;  
100 93
101 - ssl_prefer_server_ciphers on;  
102 - ssl_protocols TLSv1 TLSv1.1 TLSv1.2;  
103 - ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA";  
104 - ssl_session_tickets off;  
105 - ssl_session_cache shared:SSL:10m; 94 + # https key
  95 + include vhosts/location/yohobuywap_httpskey.conf;
  96 +
106 97
107 access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi; 98 access_log /Data/logs/nginx/access_wap.yohobuy.com.log fenxi;
108 error_log /Data/logs/error_wap.yohobuy.com.log warn; 99 error_log /Data/logs/error_wap.yohobuy.com.log warn;
@@ -166,16 +157,11 @@ server @@ -166,16 +157,11 @@ server
166 listen 443; 157 listen 443;
167 server_name analytics.m.yohobuy.com; 158 server_name analytics.m.yohobuy.com;
168 159
169 - ssl on;  
170 ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem; 160 ssl_certificate /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.pem;
171 ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key; 161 ssl_certificate_key /Data/local/nginx-1.8.0/conf/ssl/m.yohobuy.key;
172 - ssl_dhparam /Data/local/nginx-1.8.0/conf/ssl/dhparam.pem;  
173 162
174 - ssl_prefer_server_ciphers on;  
175 - ssl_protocols TLSv1 TLSv1.1 TLSv1.2;  
176 - ssl_ciphers "ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:DES-CBC3-SHA";  
177 - ssl_session_tickets off;  
178 - ssl_session_cache shared:SSL:10m; 163 + # https key
  164 + include vhosts/location/yohobuywap_httpskey.conf;
179 165
180 location / { 166 location / {
181 proxy_redirect off; 167 proxy_redirect off;
@@ -184,6 +170,6 @@ server @@ -184,6 +170,6 @@ server
184 proxy_set_header X-Real-IP $remote_addr; 170 proxy_set_header X-Real-IP $remote_addr;
185 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 171 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
186 proxy_set_header Accept-Encoding "gzip"; 172 proxy_set_header Accept-Encoding "gzip";
187 - } 173 + }
188 174
189 } 175 }