Guest User

Conf

a guest
Jul 19th, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.27 KB | None | 0 0
  1. user nobody;
  2. worker_processes auto;
  3. #worker_rlimit_nofile 65535;
  4. error_log /var/log/nginx/error.log crit;
  5. pid /var/run/nginx.pid;
  6.  
  7. events {
  8. worker_connections 1024;
  9. use epoll;
  10. multi_accept on;
  11.  
  12. }
  13. http {
  14. sendfile on;
  15. tcp_nopush on;
  16. tcp_nodelay on;
  17. client_header_timeout 3m;
  18. client_body_timeout 3m;
  19. client_max_body_size 256m;
client_header_buffer_size 4k;
  20. client_body_buffer_size 256k;
  21. large_client_header_buffers 4 32k;
  22. send_timeout 3m;
  23. keepalive_timeout 60 60;
  24. reset_timedout_connection on;
  25. server_names_hash_max_size 1024;
  26. server_names_hash_bucket_size 1024;
  27. ignore_invalid_headers on;
  28. connection_pool_size 256;
 connection_pool_size 256;
  29. request_pool_size 4k;
  30. output_buffers 4 32k;
  31. postpone_output 1460;
  32.  
  33. include mime.types;
  34. default_type application/octet-stream;
  35.  
  36. # Compression gzip
  37. gzip on;
  38. gzip_vary on;
  39. gzip_disable "MSIE [1-6]\.";
  40. gzip_proxied any;
  41. gzip_min_length 512;
  42. gzip_comp_level 6;
  43. gzip_buffers 8 64k;
  44. gzip_types text/plain text/xml text/css text/js application/x-javascrip$
  45.  
  46. # Proxy settings
  47. proxy_redirect off;
  48. proxy_set_header Host $host;
# Proxy settings
  49. proxy_redirect off;
  50. proxy_set_header Host $host;
  51. proxy_set_header X-Real-IP $remote_addr;
  52. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  53. proxy_pass_header Set-Cookie;
  54. proxy_connect_timeout 300;
  55. proxy_send_timeout 300;
  56. proxy_buffers 32 4k;
  57. proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive$
  58. proxy_cache_key "$host$request_uri $cookie_user";
  59. proxy_temp_path /var/cache/nginx/temp;
proxy_ignore_headers Expires Cache-Control;
  60. proxy_cache_use_stale error timeout invalid_header http_502;
  61. proxy_cache_valid any 1d;
  62.  
  63. open_file_cache_valid 120s;
  64. open_file_cache_min_uses 2;
  65. open_file_cache_errors off;
  66. open_file_cache max=5000 inactive=30s;
  67. open_log_file_cache max=1024 inactive=30s min_uses=2;
  68.  
  69. # SSL Settings
  70. ssl_session_cache shared:SSL:10m;
  71. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  72. ssl_prefer_server_ciphers on;
  73. ssl_ciphers "EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SH$
  74.  
  75.  
  76.  
  77. # Logs
  78. log_format main '$remote_addr - $remote_user [$time_local] $request$
  79. '"$status" $body_bytes_sent "$http_referer" '
  80. '"$http_user_agent" "$http_x_forwarded_for"';
  81. log_format bytes '$body_bytes_sent';
  82. #access_log /var/log/nginx/access.log main;
  83. access_log off;
  84.  
  85. # Cache bypass
  86. map $http_cookie $no_cache {
  87. default 0;
  88. ~SESS 1;
  89. ~wordpress_logged_in 1;
  90. }
  91.  
  92. # Include additional configuration
  93. include /etc/nginx/cloudflare.inc;
  94. include /etc/nginx/conf.d/*.conf;
  95. }
Add Comment
Please, Sign In to add comment