Guest User

nginx.conf

a guest
Nov 6th, 2014
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. user www-data;
  2. worker_processes 3;
  3. pid /run/nginx.pid;
  4. error_log /var/log/nginx/error.log;
  5.  
  6. events {
  7. worker_connections 1024;
  8. }
  9.  
  10. http {
  11.  
  12. # Basic Settings
  13. sendfile on;
  14. tcp_nopush on;
  15. tcp_nodelay on;
  16. types_hash_max_size 2048;
  17. server_tokens off;
  18. index index.php index.html index.htm;
  19.  
  20. # Buffers
  21. client_body_buffer_size 10K;
  22. client_header_buffer_size 1k;
  23. client_max_body_size 20m;
  24. large_client_header_buffers 4 8k;
  25.  
  26. # Timeouts
  27. client_body_timeout 12;
  28. client_header_timeout 12;
  29. keepalive_timeout 15;
  30. send_timeout 10;
  31.  
  32. # Gzip
  33. gzip on;
  34. gzip_http_version 1.1;
  35. gzip_vary on;
  36. gzip_comp_level 6;
  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 text/x-js;
  39. gzip_buffers 16 8k;
  40. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  41.  
  42. # Open File Cache
  43. open_file_cache max=2000 inactive=20s;
  44. open_file_cache_valid 30s;
  45. open_file_cache_min_uses 2;
  46. open_file_cache_errors on;
  47.  
  48. # Proxy-buffers
  49. proxy_buffer_size 128k;
  50. proxy_buffers 4 256k;
  51. proxy_busy_buffers_size 256k;
  52.  
  53. # SSL
  54. ssl_session_cache shared:SSL:10m;
  55. ssl_session_timeout 10m;
  56. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  57. ssl_prefer_server_ciphers on;
  58. ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;
  59. #add_header Strict-Transport-Security "max-age=31536000;";
  60.  
  61. # PHP Upstream
  62. upstream php {
  63. server 127.0.0.1:9000;
  64. }
  65.  
  66. # MIME
  67. include /etc/nginx/mime.types;
  68. default_type application/octet-stream;
  69.  
  70.  
  71. # Logging Settings
  72.  
  73. #access_log /var/log/nginx/access.log;
  74. error_log /var/log/nginx/error.log;
  75.  
  76. # Page Speed general Config
  77. pagespeed on;
  78. pagespeed FileCachePath "/var/ngx_pagespeed_cache/";
  79. pagespeed StatisticsLogging on;
  80. pagespeed LogDir /var/log/pagespeed;
  81. pagespeed EnableFilters rewrite_images,combine_css,combine_javascript,collapse_whitespace,extend_cache,rewrite_css;
  82. # Includes
  83. include /etc/nginx/conf.d/*.conf;
  84. include /etc/nginx/sites-enabled/*;
  85. }
Advertisement
Add Comment
Please, Sign In to add comment