nginx.conf 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. user www-data;
  2. worker_processes auto;
  3. error_log /var/log/nginx/error.log warn;
  4. pid /var/run/nginx.pid;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http {
  9. include /etc/nginx/mime.types;
  10. default_type application/octet-stream;
  11. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  12. '$status $body_bytes_sent "$http_referer" '
  13. '"$http_user_agent" "$http_x_forwarded_for"';
  14. #access_log /var/log/nginx/access.log main;
  15. access_log off;
  16. sendfile on;
  17. tcp_nopush on;
  18. server_tokens off;
  19. keepalive_timeout 65;
  20. gzip on;
  21. gzip_disable "msie6";
  22. gzip_comp_level 4;
  23. gzip_buffers 16 8k;
  24. gzip_http_version 1.1;
  25. gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
  26. include /etc/nginx/conf.d/*.conf;
  27. include /etc/nginx/sites-enabled/*;
  28. #### SSL
  29. include /etc/nginx/nginx_ssl.conf;
  30. ####
  31. tcp_nodelay on;
  32. types_hash_max_size 2048;
  33. ### codepage
  34. charset utf8;
  35. source_charset utf8;
  36. #### Tuning system....
  37. client_max_body_size 40M;
  38. client_body_timeout 10;
  39. client_header_timeout 10;
  40. send_timeout 10;
  41. set_real_ip_from 127.0.0.1;
  42. real_ip_header X-Real-IP;
  43. }