nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. user root;
  2. worker_processes 8;
  3. daemon off;
  4. error_log /var/log/nginx/error.log warn;
  5. pid /run/nginx.pid;
  6. worker_rlimit_nofile 65535;
  7. events {
  8. worker_connections 65535;
  9. multi_accept on;
  10. use epoll;
  11. }
  12. http {
  13. include mime.types;
  14. default_type application/octet-stream;
  15. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  16. '$status $body_bytes_sent "$http_referer" '
  17. '"$http_user_agent" "$http_x_forwarded_for"';
  18. access_log /var/log/nginx/access.log main;
  19. # proxy
  20. upstream backend {
  21. server 127.0.0.1:80;
  22. }
  23. proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G;
  24. sendfile on;
  25. tcp_nopush on;
  26. tcp_nodelay on;
  27. keepalive_timeout 6500;
  28. fastcgi_connect_timeout 8000;
  29. fastcgi_send_timeout 8000;
  30. fastcgi_read_timeout 8000;
  31. fastcgi_buffer_size 512k;
  32. fastcgi_buffers 32 512k;
  33. fastcgi_busy_buffers_size 2048k;
  34. fastcgi_temp_file_write_size 2048k;
  35. client_max_body_size 500m;
  36. client_body_buffer_size 2048k;
  37. client_header_buffer_size 2048k;
  38. large_client_header_buffers 4 4096k;
  39. #gzip on;
  40. include conf.d/*.conf;
  41. }