nginx.conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. user www-data;
  2. worker_processes auto;
  3. events {
  4. worker_connections 1024;
  5. }
  6. http {
  7. ##
  8. # Basic Settings
  9. ##
  10. sendfile on;
  11. tcp_nopush on;
  12. tcp_nodelay on;
  13. keepalive_timeout 65;
  14. types_hash_max_size 2048;
  15. server_tokens off;
  16. reset_timedout_connection on;
  17. # server_names_hash_bucket_size 64;
  18. # server_name_in_redirect off;
  19. include mime.types;
  20. default_type application/octet-stream;
  21. ##
  22. # Logging Settings
  23. ##
  24. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  25. '$status $body_bytes_sent "$http_referer" '
  26. '"$http_user_agent" "$http_x_forwarded_for"';
  27. access_log /var/log/nginx/access.log;
  28. error_log /var/log/nginx/error.log;
  29. ##
  30. # Gzip Settings
  31. ##
  32. gzip on;
  33. gzip_disable "MSIE [1-6]\.";
  34. gzip_min_length 256;
  35. gzip_comp_level 3;
  36. gzip_buffers 64 32K;
  37. gzip_proxied expired no-cache no-store private auth;
  38. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
  39. gzip_vary on;
  40. open_file_cache max=1000 inactive=40s;
  41. open_file_cache_valid 60s;
  42. open_file_cache_min_uses 2;
  43. open_file_cache_errors on;
  44. include conf.d/*.conf;
  45. include sites-enabled/*;
  46. }