nginx.conf 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. user www-data;
  2. worker_cpu_affinity auto;
  3. worker_processes auto;
  4. error_log stderr error;
  5. #worker_rlimit_nofile 1024000;
  6. timer_resolution 1s;
  7. daemon off;
  8. pcre_jit on;
  9. events {
  10. worker_connections 100000;
  11. multi_accept off;
  12. }
  13. http {
  14. #include /etc/nginx/mime.types;
  15. access_log off;
  16. server_tokens off;
  17. msie_padding off;
  18. sendfile off;
  19. tcp_nopush off;
  20. tcp_nodelay on;
  21. keepalive_timeout 65s;
  22. keepalive_disable none;
  23. keepalive_requests 100000;
  24. php_ini_path /deploy/conf/php.ini;
  25. init_worker_by_php '
  26. require "app.php";
  27. ';
  28. server {
  29. listen *:8080 backlog=65535 reuseport;
  30. root /;
  31. index index.html;
  32. php_keepalive 256;
  33. location = /fortunes {
  34. content_by_php '
  35. fortune();
  36. ';
  37. }
  38. location = /db {
  39. content_by_php '
  40. db();
  41. ';
  42. }
  43. location /query {
  44. content_by_php '
  45. query();
  46. ';
  47. }
  48. location /update {
  49. content_by_php '
  50. update();
  51. ';
  52. }
  53. # location = /info {
  54. # add_header Content-Type text/html;
  55. # content_by_php '
  56. # phpinfo();
  57. # ';
  58. # }
  59. }
  60. }