nginx_uwsgi.conf 1.7 KB

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