Browse Source

fastcgi keepalive

Patrick Falls 12 years ago
parent
commit
637aec7da1

+ 9 - 3
php-codeigniter/deploy/nginx.conf

@@ -30,6 +30,11 @@ http {
     keepalive_timeout  65;
 
     #gzip  on;
+    
+    upstream fastcgi_backend {
+        server 127.0.0.1:9001;
+        keepalive 32;
+    }
 
     server {
         listen       8080;
@@ -59,7 +64,7 @@ http {
         #    proxy_pass   http://127.0.0.1;
         #}
 
-        root /home/ubuntu/FrameworkBenchmarks/php-codeigniter/;
+        root /home/pfalls/FrameworkBenchmarks/php-codeigniter/;
         index  index.php;
 
         location / {
@@ -70,10 +75,11 @@ http {
         #
         location ~ \.php$ {
             try_files $uri =404;
-            fastcgi_pass   127.0.0.1:9001;
+            fastcgi_pass   fastcgi_backend;
             fastcgi_index  index.php;
 #            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
+            fastcgi_keep_conn on;
             include        /usr/local/nginx/conf/fastcgi_params;
         }
 
@@ -122,4 +128,4 @@ http {
     #    }
     #}
 
-}
+}

+ 7 - 3
php-phalcon-micro/deploy/nginx.conf

@@ -30,7 +30,10 @@ http {
     keepalive_timeout  65;
 
     #gzip  on;
-
+    upstream fastcgi_backend {
+        server 127.0.0.1:9001;
+        keepalive 32;
+    }
     server {
         listen       8080;
         server_name  localhost;
@@ -59,7 +62,7 @@ http {
         #    proxy_pass   http://127.0.0.1;
         #}
 
-        root /home/ubuntu/FrameworkBenchmarks/php-phalcon-micro/public/;
+        root /home/pfalls/FrameworkBenchmarks/php-phalcon-micro/public/;
         index  index.php;
 
         location / {
@@ -70,10 +73,11 @@ http {
         #
         location ~ \.php$ {
             try_files $uri =404;
-            fastcgi_pass   127.0.0.1:9001;
+            fastcgi_pass   fastcgi_backend;
             fastcgi_index  index.php;
 #            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
+            fastcgi_keep_conn on;
             include        /usr/local/nginx/conf/fastcgi_params;
         }
 

+ 8 - 2
php-phalcon/deploy/nginx.conf

@@ -30,6 +30,11 @@ http {
     keepalive_timeout  65;
 
     #gzip  on;
+    
+    upstream fastcgi_backend {
+        server 127.0.0.1:9001;
+        keepalive 32;
+    }
 
     server {
         listen       8080;
@@ -59,7 +64,7 @@ http {
         #    proxy_pass   http://127.0.0.1;
         #}
 
-        root /home/ubuntu/FrameworkBenchmarks/php-phalcon/public/;
+        root /home/pfalls/FrameworkBenchmarks/php-phalcon/public/;
         index  index.php;
 
         location / {
@@ -70,10 +75,11 @@ http {
         #
         location ~ \.php$ {
             try_files $uri =404;
-            fastcgi_pass   127.0.0.1:9001;
+            fastcgi_pass   fastcgi_backend;
             fastcgi_index  index.php;
 #            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
+	    fastcgi_keep_conn on;
             include        /usr/local/nginx/conf/fastcgi_params;
         }