www.conf 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. server_info off;
  2. server_tag EWS/1.0.0;
  3. log_empty_request off;
  4. gzip on;
  5. gzip_min_length 1k;
  6. gzip_buffers 4 16k;
  7. gzip_http_version 1.1;
  8. gzip_comp_level 7;
  9. gzip_types text/plain application/x-javascript text/css application/xml;
  10. gzip_vary on;
  11. proxy_redirect off ;
  12. proxy_http_version 1.1;
  13. proxy_set_header Connection "";
  14. proxy_set_header Host $host;
  15. proxy_set_header Referer $http_referer;
  16. proxy_set_header Cookie $http_cookie;
  17. proxy_set_header X-Real-IP $remote_addr;
  18. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  19. proxy_connect_timeout 30;
  20. proxy_send_timeout 30;
  21. proxy_read_timeout 60;
  22. proxy_buffer_size 512k;
  23. proxy_buffers 8 512k;
  24. proxy_busy_buffers_size 512k;
  25. proxy_temp_file_write_size 512k;
  26. proxy_next_upstream error timeout http_503;
  27. server
  28. {
  29. listen 80;
  30. server_name 0.0.0.0;
  31. #charset GB2312;
  32. location ~ /nginx_status {
  33. stub_status on;
  34. access_log off;
  35. allow 10.0.0.0/8;
  36. allow 192.168.0.0/16;
  37. deny all;
  38. }
  39. location ~ /cache {
  40. proxy_pass http://backend;
  41. allow 10.0.0.0/8;
  42. allow 192.168.0.0/16;
  43. deny all;
  44. }
  45. if ($http_cookie ~* ".*uid=(.*?);.*$")
  46. {
  47. set $uid $1;
  48. }
  49. if ($request_uri ~* ".*wver=(\w*)")
  50. {
  51. set $mid $1;
  52. }
  53. location ~* \.(css|css\?.*|js|js\?.*|gif|jpg|jpg\?.*|jpeg|png|ico)$ {
  54. proxy_cache easou;
  55. proxy_cache_valid 200 10m;
  56. proxy_pass http://backend;
  57. access_log off;
  58. }
  59. location / {
  60. proxy_pass http://backend;
  61. }
  62. }
  63. log_format i.easou.com 'v1{]i.easou.com{]$request{]$upstream_http_esid{]$year$month$day $hour$minute$second{]$status{]-{]$request_time_msec{]$body_bytes_sent{]$bytes_sent{]$remote_addr{]$http_x_forwarded_for{]$http_referer{]$sent_http_mobile{]$http_user_agent{]_$mid{]$uid{]$http_via{]v1';
  64. access_log /log/nginx/visit/access.log i.easou.com;
  65. include vhosts/www/hostlist.conf;