nginx.conf 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # This file is based on /usr/local/nginx/conf/nginx.conf.default.
  2. worker_processes auto;
  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 backlog=65535 reuseport;
  33. server_name localhost;
  34. location / {
  35. fastcgi_pass unix:/var/tmp/cppcms.sock;
  36. fastcgi_split_path_info ^()((?:/.*))?$;
  37. fastcgi_param PATH_INFO $fastcgi_path_info;
  38. }
  39. }
  40. }