Browse Source

PHP add fastcgi_socket_keepalive in nginx (#5861)

* PHP add fastcgi_socket_keepalive in nginx

* Move the lines in conf
Joan Miquel 5 years ago
parent
commit
445ebcaa37

+ 2 - 2
frameworks/PHP/kumbiaphp/deploy/nginx.conf

@@ -40,7 +40,8 @@ http {
     fastcgi_temp_file_write_size 256k;
     reset_timedout_connection on;
     server_names_hash_bucket_size 100;
-
+    fastcgi_keep_conn on;
+    fastcgi_socket_keepalive on;
 
     upstream fastcgi_backend {
         server unix:/var/run/php/php-fpm.sock;
@@ -56,7 +57,6 @@ http {
 
         location / {
             fastcgi_pass   fastcgi_backend;
-            fastcgi_keep_conn on;
             fastcgi_param  SCRIPT_FILENAME    $document_root/index.php;
             fastcgi_param  PATH_INFO          $uri;
             fastcgi_param  QUERY_STRING       $query_string;

+ 2 - 2
frameworks/PHP/php/deploy/nginx-pools.conf

@@ -42,7 +42,8 @@ http {
     fastcgi_temp_file_write_size 256k;
     reset_timedout_connection on;
     server_names_hash_bucket_size 100;
-
+    fastcgi_keep_conn on;
+    fastcgi_socket_keepalive on;
 
     upstream fastcgi_backend {
         server unix:/var/run/php/php-fpm.sock;
@@ -60,7 +61,6 @@ http {
         location ~ \.php$ {
              
             fastcgi_pass   fastcgi_backend;
-            fastcgi_keep_conn on;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
             include        /etc/nginx/fastcgi_params;

+ 1 - 1
frameworks/PHP/php/deploy/nginx7.conf

@@ -42,6 +42,7 @@ http {
     fastcgi_temp_file_write_size 256k;
     reset_timedout_connection on;
     server_names_hash_bucket_size 100;
+    fastcgi_keep_conn on;
     fastcgi_socket_keepalive on;
 
     upstream fastcgi_backend {
@@ -59,7 +60,6 @@ http {
         location ~ \.php$ {
              
             fastcgi_pass   fastcgi_backend;
-            fastcgi_keep_conn on;
             fastcgi_index  index.php;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
             include        /etc/nginx/fastcgi_params;