Advertisement
Guest User

Untitled

a guest
Jul 18th, 2018
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. user www-data;
  2. worker_processes 4;
  3. pid /var/run/nginx.pid;
  4.  
  5. events {
  6. worker_connections 1024;
  7. multi_accept on;
  8. }
  9.  
  10. http {
  11. sendfile on;
  12. keepalive_timeout 65;
  13.  
  14. add_header X-Frame-Options SAMEORIGIN;
  15. limit_req_zone $binary_remote_addr zone=one:15m rate=15r/s;
  16.  
  17. ##########
  18. tcp_nodelay on;
  19. tcp_nopush on;
  20. #########
  21.  
  22. geoip_country /etc/nginx/geoip/GeoIP.dat;
  23. map $geoip_country_code $bad_country {
  24. default 0;
  25. include geoip/bad_countries;
  26. }
  27.  
  28. include /etc/nginx/mime.types;
  29. # default_type application/octet-stream;
  30.  
  31. access_log /var/log/nginx/access.log;
  32. error_log /var/log/nginx/error.log;
  33.  
  34. gzip on;
  35. gzip_disable "msie6";
  36. gzip_min_length 256;
  37. gzip_proxied any;
  38. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript application/octet-stream image/svg+xml;
  39. gzip_disable "msie6";
  40. gzip_comp_level 6;
  41. gzip_vary on;
  42.  
  43. brotli on;
  44. # brotli_static on;
  45. brotli_types *;
  46. brotli_comp_level 6;
  47.  
  48.  
  49. # Include the perl module
  50. perl_modules perl/lib;
  51. # Define this function
  52. perl_set $uri_lowercase 'sub {
  53. my $r = shift;
  54. my $uri = $r->uri;
  55. $uri = lc($uri);
  56. return $uri;
  57. }';
  58.  
  59.  
  60. fastcgi_cache_path /etc/nginx/cache levels=1:2 keys_zone=fcgi:500m inactive=884h;
  61. fastcgi_cache_key "$request_method$request_uri";
  62. client_max_body_size 50m;
  63. client_body_buffer_size 128k;
  64.  
  65. #client_body_buffer_size 10K;
  66. #client_header_buffer_size 1k;
  67. #client_max_body_size 8m;
  68. #large_client_header_buffers 2 1k;
  69.  
  70. fastcgi_read_timeout 240;
  71. fastcgi_send_timeout 240;
  72. fastcgi_connect_timeout 240;
  73. fastcgi_buffers 16 16k;
  74. fastcgi_buffer_size 32k;
  75. fastcgi_busy_buffers_size 64k;
  76. fastcgi_temp_file_write_size 64k;
  77.  
  78. include /etc/nginx/sites-enabled/*;
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement