nginx.conf 756 B

12345678910111213141516171819202122232425262728293031323334
  1. # let's assume dual-core machine
  2. worker_processes 2;
  3. error_log /var/log/nginx/error.log debug;
  4. pid /var/run/nginx.pid;
  5. events {
  6. # this should be equal to value of "ulimit -n"
  7. # reference: https://www.digitalocean.com/community/tutorials/how-to-optimize-nginx-configuration
  8. worker_connections 1048576;
  9. }
  10. http {
  11. include /etc/nginx/mime.types;
  12. default_type application/octet-stream;
  13. log_format main
  14. '$remote_addr - $remote_user [$time_local] "$request" '
  15. '$status $body_bytes_sent "$http_referer" '
  16. '"$http_user_agent" "$http_x_forwarded_for"';
  17. access_log /var/log/nginx/access.log main;
  18. sendfile on;
  19. #tcp_nopush on;
  20. keepalive_timeout 65;
  21. #gzip on;
  22. client_max_body_size 20M;
  23. include /etc/nginx/conf.d/*.conf;
  24. }