Advertisement
Guest User

nginxfpm

a guest
Mar 21st, 2020
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. --- PHP-FPM www pool ---
  2.  
  3. [www]
  4. user = www-data
  5. group = www-data
  6. listen = 127.0.0.1:9000
  7. listen.backlog = 511
  8. listen.owner = www-data
  9. listen.group = www-data
  10. pm = static
  11. pm.max_children = 128
  12. pm.start_servers = 2
  13. pm.min_spare_servers = 1
  14. pm.max_spare_servers = 3
  15. pm.status_path = /status_fpm
  16.  
  17.  
  18. --- NGINX CONFIG ---
  19.  
  20. user www-data;
  21. worker_processes auto;
  22. pid /run/nginx.pid;
  23. include /etc/nginx/modules-enabled/*.conf;
  24. events {
  25. use epoll;
  26. worker_connections 4096;
  27. multi_accept on;
  28. }
  29. http {
  30. ##
  31. # Basic Settings
  32. ##
  33. sendfile off;
  34. tcp_nopush off;
  35. tcp_nodelay on;
  36. keepalive_timeout 65;
  37. types_hash_max_size 2048;
  38. proxy_buffering off;
  39. proxy_buffer_size 128k;
  40. proxy_buffers 100 128k;
  41. # server_tokens off;
  42. # server_names_hash_bucket_size 64;
  43. # server_name_in_redirect off;
  44. include /etc/nginx/mime.types;
  45. default_type application/octet-stream;
  46.  
  47. server_tokens off;
  48. ##
  49. # SSL Settings
  50. ##
  51. ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
  52. ssl_prefer_server_ciphers on;
  53. ##
  54. # Logging Settings
  55. ##
  56. access_log /var/log/nginx/access.log;
  57. error_log /var/log/nginx/error.log error;
  58. ##
  59. # Gzip Settings
  60. ##
  61. gzip on;
  62. gzip_disable "msie6";
  63. # gzip_vary on;
  64. # gzip_proxied any;
  65. # gzip_comp_level 6;
  66. # gzip_buffers 16 8k;
  67. # gzip_http_version 1.1;
  68. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  69. ##
  70. # Virtual Host Configs
  71. ##
  72. include /etc/nginx/conf.d/*.conf;
  73. include /etc/nginx/sites-enabled/*;
  74. }
  75.  
  76.  
  77. --- VHOSTS CONFIG ---
  78.  
  79. index index.php index.html index.htm;
  80. charset utf-8;
  81. location / {
  82. try_files $uri $uri/ /index.php?$query_string;
  83. add_header 'Access-Control-Allow-Origin' *;
  84. }
  85. location = /favicon.ico { access_log off; log_not_found off; }
  86. location = /robots.txt { access_log off; log_not_found off; }
  87. sendfile off;
  88. client_max_body_size 100m;
  89. location ~ \.php$ {
  90. fastcgi_pass 127.0.0.1:9000;
  91. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  92. include fastcgi_params;
  93. }
  94. location ~ /\.ht {
  95. deny all;
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement