|
@@ -0,0 +1,99 @@
|
|
|
|
+#gzip on;
|
|
|
|
+gzip_min_length 1k;
|
|
|
|
+gzip_buffers 4 16k;
|
|
|
|
+gzip_http_version 1.1;
|
|
|
|
+gzip_comp_level 7;
|
|
|
|
+gzip_types text/plain application/x-javascript text/css application/xml application/json;
|
|
|
|
+gzip_vary on;
|
|
|
|
+
|
|
|
|
+server
|
|
|
|
+{
|
|
|
|
+listen 80;
|
|
|
|
+server_name 0.0.0.0;
|
|
|
|
+#server_name api.appeasou.com api.easou.com api.easou.com.cn api.ps.easou.com api.ps.appeasou.com api.ps.easou.com.cn;
|
|
|
|
+#charset ISO-88509-1;
|
|
|
|
+#default_type 'application/x-javascript;charset=utf-8';
|
|
|
|
+####################################
|
|
|
|
+location /status {
|
|
|
|
+ stub_status on;
|
|
|
|
+ access_log off;
|
|
|
|
+}
|
|
|
|
+location /check.html {
|
|
|
|
+ access_log off;
|
|
|
|
+ root html;
|
|
|
|
+}
|
|
|
|
+####################################
|
|
|
|
+location / {
|
|
|
|
+ lua_need_request_body on;
|
|
|
|
+ content_by_lua 'local s = ngx.var.request_body';
|
|
|
|
+ if ($http_cookie ~* ".*uid=(.*?);.*$")
|
|
|
|
+ {
|
|
|
|
+ set $uid $1;
|
|
|
|
+ }
|
|
|
|
+# if ($http_cookie ~* ".*wver=([a-z]{1,3}).*$") {
|
|
|
|
+# set $mid $1;
|
|
|
|
+# }
|
|
|
|
+ if ($arg_version = "002")
|
|
|
|
+ {
|
|
|
|
+ gzip on;
|
|
|
|
+ }
|
|
|
|
+ if ($request_uri ~* "phonevcode.m") {
|
|
|
|
+ set $udid Y;
|
|
|
|
+ }
|
|
|
|
+ if ($request_uri ~* "04DF3BD2E4ABC777178BF81D2A5A2C85|pushid=160a3797c86e80e490b") {
|
|
|
|
+ set $udid "${udid}Y";
|
|
|
|
+ }
|
|
|
|
+# if ($http_x_forwarded_for ~* "140.249.25.4|223.99.225.242|47.104.189.234"){
|
|
|
|
+# set $udid "${udid}Y";
|
|
|
|
+# }
|
|
|
|
+ if ($udid = YY) {
|
|
|
|
+ return 403;
|
|
|
|
+ }
|
|
|
|
+ if ($udid = YYY) {
|
|
|
|
+ return 403;
|
|
|
|
+ }
|
|
|
|
+ #if ($http_referer ~* "04DF3BD2E4ABC777178BF81D2A5A2C85") {
|
|
|
|
+ # #rewrite ^/ http://223.99.225.200:81;
|
|
|
|
+ # return 403;
|
|
|
|
+ #}
|
|
|
|
+ #if ($request_uri ~* ".*chapter_list.*appverion.*os.*nid.*gid.*udid.*ch.*")
|
|
|
|
+
|
|
|
|
+ if ($request_uri ~* "5DFB568E03AA473E935CB4938EEABFB0|09E26261CA0E83345A7C3FFA4BC9665B|1CD36DE4D4D16379AE34190257A6ACC9|HOq2T4rj5vzuTHw2V81BitalcA9Ut|C9C12A31E5CDE899F35CDF2AA45B03D5|09053442eef08741ed2fd376dc1a61581154bbef|04DF3BD2E4ABC777178BF81D2A5A2C85|CCA85FE110CABA44AC60DB21C17C73E6|58D69B86ACFBCB971EF7B4A743A3C09B|3E9A05076F42B5643E335B13490FC27B|7C420B097EBCD3B97A254AAB018B17CF|3EC834A7F048B3EE6DD4FA0D3C1351DA")
|
|
|
|
+ {
|
|
|
|
+ #rewrite ^/ http://223.99.225.200:81;
|
|
|
|
+ return 403;
|
|
|
|
+ }
|
|
|
|
+ if ($http_user_agent ~* "QiDian|douban|cyhj|sjmz|ydsc|jmktcyw") {
|
|
|
|
+ return 403;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+proxy_pass http://api.ieasou.cn;
|
|
|
|
+proxy_redirect off ;
|
|
|
|
+proxy_http_version 1.1;
|
|
|
|
+proxy_set_header Connection "";
|
|
|
|
+proxy_set_header Host $host;
|
|
|
|
+proxy_set_header Referer $http_referer;
|
|
|
|
+proxy_set_header Cookie $http_cookie;
|
|
|
|
+proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
+proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
+client_max_body_size 70m;
|
|
|
|
+client_body_buffer_size 800k;
|
|
|
|
+proxy_connect_timeout 35s;
|
|
|
|
+proxy_send_timeout 35s;
|
|
|
|
+proxy_read_timeout 35s;
|
|
|
|
+proxy_buffer_size 512k;
|
|
|
|
+proxy_buffers 4 512k;
|
|
|
|
+proxy_busy_buffers_size 512k;
|
|
|
|
+proxy_temp_file_write_size 512k;
|
|
|
|
+proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504 http_404;
|
|
|
|
+proxy_max_temp_file_size 128m;
|
|
|
|
+#proxy_headers_hash_bucket_size 64;
|
|
|
|
+###set log##
|
|
|
|
+}
|
|
|
|
+}
|
|
|
|
+log_format api.easou.com 'v1{]api.ieasou.cn{]$request{]HHvDHAMjq2I{]$year$month$day $hour$minute$second{]$status{]-{]$request_time_usec{]$body_bytes_sent{]$bytes_sent{]$remote_addr{]$http_x_forwarded_for{]$http_referer{]$request_body{]$http_user_agent{]-{]$uid{]$http_via{]v1';
|
|
|
|
+
|
|
|
|
+access_log /data/log/resin-books/bo/visit/access.log api.easou.com buffer=128k;
|
|
|
|
+
|
|
|
|
+include vhosts/book/hostlist.conf;
|
|
|
|
+include vhosts/book/https.conf;
|