Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. user nginx;
  2. worker_processes auto;
  3. #worker_priority -10;
  4. worker_rlimit_nofile 100000;
  5.  
  6. timer_resolution 100ms;
  7. pcre_jit on;
  8.  
  9. error_log /var/log/nginx/error.log crit;
  10. pid /var/run/nginx.pid;
  11.  
  12. events {
  13. worker_connections 3500;
  14. use epoll;
  15. #accept_mutex on;
  16.  
  17. #accept_mutex_delay 200ms;
  18. multi_accept on;
  19. }
  20.  
  21. http {
  22. include /etc/nginx/mime.types;
  23. default_type application/octet-stream;
  24. include /etc/nginx/conf/ddos1.conf;
  25. log_format main ‘$remote_addr – $remote_user [$time_local] “$request” ‘
  26. ‘$status $body_bytes_sent “$http_referer” ‘
  27. ‘”$http_user_agent” “$http_x_forwarded_for”‘;
  28. more_set_headers “Server: Nginx”;
  29. more_set_headers “X-Powered-By: VPSSIM”
  30. access_log off;
  31.  
  32. sendfile_max_chunk 512k;
  33. tcp_nopush on;
  34. tcp_nodelay on;
  35. types_hash_max_size 2048;
  36. server_tokens off;
  37. server_name_in_redirect off;
  38. server_names_hash_bucket_size 128;
  39. open_file_cache max=130000 inactive=20s;
  40. open_file_cache_valid 30s;
  41. open_file_cache_min_uses 2;
  42. open_file_cache_errors off;
  43. open_log_file_cache max=10000 inactive=30s min_uses=2;
  44. output_buffers 8 256k;
  45. postpone_output 1460;
  46. request_pool_size 32k;
  47. connection_pool_size 512;
  48. directio 4m;
  49.  
  50. client_body_buffer_size 256k;
  51. client_body_timeout 50;
  52. client_header_buffer_size 64k;
  53. client_body_in_file_only off;
  54. large_client_header_buffers 4 256k;
  55. client_header_timeout 15;
  56. ignore_invalid_headers on;
  57. client_max_body_size 240m;
  58.  
  59. keepalive_timeout 20;
  60. keepalive_requests 1000;
  61. keepalive_disable msie6;
  62. lingering_time 20s;
  63. lingering_timeout 5s;
  64. reset_timedout_connection on;
  65. send_timeout 50;
  66.  
  67. gzip on;
  68. gzip_static on;
  69. gzip_disable “msie6”;
  70. gzip_vary on;
  71. gzip_proxied any;
  72. gzip_comp_level 5;
  73. gzip_buffers 32 8k;
  74. gzip_min_length 1024;
  75. gzip_http_version 1.1;
  76. GNU nano 2.0.9 File: /etc/nginx/nginx.conf
  77.  
  78. gzip_types text/plain text/css application/json application/javascript text/xml application/xml app$
  79.  
  80. # Cloudflare module cho nginx
  81. set_real_ip_from 204.93.240.0/24;
  82. set_real_ip_from 204.93.177.0/24;
  83. set_real_ip_from 199.27.128.0/21;
  84. set_real_ip_from 173.245.48.0/20;
  85. set_real_ip_from 103.21.244.0/22;
  86. set_real_ip_from 103.22.200.0/22;
  87. set_real_ip_from 103.31.4.0/22;
  88. set_real_ip_from 141.101.64.0/18;
  89. set_real_ip_from 108.162.192.0/18;
  90. set_real_ip_from 190.93.240.0/20;
  91. set_real_ip_from 188.114.96.0/20;
  92. set_real_ip_from 197.234.240.0/22;
  93. set_real_ip_from 198.41.128.0/17;
  94. real_ip_header CF-Connecting-IP;
  95. fastcgi_buffers 8 16k;
  96. fastcgi_buffer_size 32k;
  97. fastcgi_connect_timeout 300;
  98. fastcgi_send_timeout 300;
  99. fastcgi_read_timeout 300;
  100.  
  101. include /etc/nginx/conf.d/*.conf;
  102. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement