nginx.conf 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # This file is based on /usr/local/nginx/conf/nginx.conf.default.
  2. # One worker process per core
  3. error_log stderr error;
  4. events {
  5. # This needed to be increased because the nginx error log said so.
  6. # http://nginx.org/en/docs/ngx_core_module.html#worker_connections
  7. worker_connections 65535;
  8. multi_accept on;
  9. }
  10. http {
  11. default_type application/octet-stream;
  12. client_body_temp_path /tmp;
  13. # turn off request logging for performance
  14. access_log off;
  15. # I think these only options affect static file serving
  16. sendfile on;
  17. tcp_nopush on;
  18. # Allow many HTTP Keep-Alive requests in a single TCP connection before
  19. # closing it (the default is 100). This will minimize the total number
  20. # of TCP connections opened/closed. The problem is that this may cause
  21. # some worker processes to be handling too connections relative to the
  22. # other workers based on an initial imbalance, so this is disabled for
  23. # now.
  24. # keepalive_requests 1000;
  25. #keepalive_timeout 0;
  26. keepalive_timeout 65;
  27. server {
  28. # For information on deferred, see:
  29. # http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
  30. # http://www.techrepublic.com/article/take-advantage-of-tcp-ip-options-to-optimize-data-transmission/
  31. # The backlog argument to listen() is set to match net.ipv4.tcp_max_syn_backlog and net.core.somaxconn
  32. listen 8080 default_server deferred reuseport backlog=65535;
  33. server_name localhost;
  34. location / {
  35. uwsgi_pass unix:/var/tmp/uwsgi.sock;
  36. include /usr/local/nginx/conf/uwsgi_params;
  37. }
  38. }
  39. }