https.conf 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. server
  2. {
  3. listen 443;
  4. server_name api.ieasou.cn;
  5. ssl on;
  6. ssl_certificate /data/sslkey/ieasou.cn/api.ieasou.cn.pem;
  7. ssl_certificate_key /data/sslkey/ieasou.cn/api.ieasou.cn.key;
  8. ssl_session_timeout 5m;
  9. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  10. ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
  11. ssl_prefer_server_ciphers on;
  12. location /status {
  13. stub_status on;
  14. access_log off;
  15. }
  16. location / {
  17. if ($http_cookie ~* ".*uid=(.*?);.*$")
  18. {
  19. set $uid $1;
  20. }
  21. # if ($http_cookie ~* ".*wver=([a-z]{1,3}).*$") {
  22. # set $mid $1;
  23. # }
  24. if ($arg_version = "002")
  25. {
  26. gzip on;
  27. }
  28. if ($request_uri ~* "phonevcode.m") {
  29. set $udid Y;
  30. }
  31. if ($request_uri ~* "04DF3BD2E4ABC777178BF81D2A5A2C85|pushid=160a3797c86e80e490b") {
  32. set $udid "${udid}Y";
  33. }
  34. if ($remote_addr ~* "140.249.25.4|223.99.225.242"){
  35. set $udid "${udid}Y";
  36. }
  37. if ($udid = YY) {
  38. return 403;
  39. }
  40. if ($request_uri ~* "5DFB568E03AA473E935CB4938EEABFB0|09E26261CA0E83345A7C3FFA4BC9665B|1CD36DE4D4D16379AE34190257A6ACC9|HOq2T4rj5vzuTHw2V81BitalcA9Ut|C9C12A31E5CDE899F35CDF2AA45B03D5|09053442eef08741ed2fd376dc1a61581154bbef|04DF3BD2E4ABC777178BF81D2A5A2C85|CCA85FE110CABA44AC60DB21C17C73E6|58D69B86ACFBCB971EF7B4A743A3C09B|3E9A05076F42B5643E335B13490FC27B|7C420B097EBCD3B97A254AAB018B17CF|3EC834A7F048B3EE6DD4FA0D3C1351DA")
  41. {
  42. #rewrite ^/ http://223.99.225.200:81;
  43. return 403;
  44. }
  45. if ($http_user_agent ~* "QiDian|douban|cyhj|sjmz|ydsc|jmktcyw") {
  46. return 403;
  47. }
  48. proxy_pass http://api.ieasou.cn;
  49. proxy_redirect off ;
  50. proxy_http_version 1.1;
  51. proxy_set_header Connection "";
  52. proxy_set_header Host $host;
  53. proxy_set_header Referer $http_referer;
  54. proxy_set_header Cookie $http_cookie;
  55. proxy_set_header X-Real-IP $remote_addr;
  56. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  57. client_max_body_size 60m;
  58. client_body_buffer_size 512k;
  59. proxy_connect_timeout 35s;
  60. proxy_send_timeout 35s;
  61. proxy_read_timeout 35s;
  62. proxy_buffer_size 512k;
  63. proxy_buffers 4 512k;
  64. proxy_busy_buffers_size 512k;
  65. proxy_temp_file_write_size 512k;
  66. proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
  67. proxy_max_temp_file_size 128m;
  68. }
  69. }