nginx.conf 1.7 KB

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