nginx7.conf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. user www-data;
  2. worker_processes auto;
  3. error_log stderr error;
  4. worker_rlimit_nofile 200000;
  5. events {
  6. worker_connections 16384;
  7. multi_accept on;
  8. }
  9. http {
  10. include /etc/nginx/mime.types;
  11. default_type application/octet-stream;
  12. access_log off;
  13. server_tokens off;
  14. sendfile on;
  15. tcp_nopush on;
  16. tcp_nodelay on;
  17. keepalive_timeout 65;
  18. open_file_cache max=2000 inactive=20s;
  19. open_file_cache_valid 60s;
  20. open_file_cache_min_uses 5;
  21. open_file_cache_errors off;
  22. #FastCGI optimizations
  23. fastcgi_buffers 256 16k;
  24. fastcgi_buffer_size 128k;
  25. fastcgi_connect_timeout 30s;
  26. fastcgi_send_timeout 60s;
  27. fastcgi_read_timeout 60s;
  28. fastcgi_busy_buffers_size 256k;
  29. fastcgi_temp_file_write_size 256k;
  30. reset_timedout_connection on;
  31. server_names_hash_bucket_size 100;
  32. upstream fastcgi_backend {
  33. server unix:/var/run/php/php7.2-fpm.sock;
  34. keepalive 50;
  35. }
  36. server {
  37. listen 8080 reuseport;
  38. server_name localhost;
  39. root /php/;
  40. index index.php;
  41. location ~ \.php$ {
  42. fastcgi_pass fastcgi_backend;
  43. fastcgi_keep_conn on;
  44. fastcgi_index index.php;
  45. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  46. include /etc/nginx/fastcgi_params;
  47. }
  48. }
  49. }