Browse Source

Sync nginx configuration changes

Gerard Roche 11 years ago
parent
commit
ca4e211e5d
1 changed files with 9 additions and 2 deletions
  1. 9 2
      php-zend-framework/deploy/nginx.conf

+ 9 - 2
php-zend-framework/deploy/nginx.conf

@@ -22,6 +22,7 @@ http {
     #                  '"$http_user_agent" "$http_x_forwarded_for"';
     #                  '"$http_user_agent" "$http_x_forwarded_for"';
 
 
     #access_log  logs/access.log  main;
     #access_log  logs/access.log  main;
+    access_log off;
 
 
     sendfile        on;
     sendfile        on;
     #tcp_nopush     on;
     #tcp_nopush     on;
@@ -31,6 +32,11 @@ http {
 
 
     #gzip  on;
     #gzip  on;
 
 
+    upstream fastcgi_backend {
+        server 127.0.0.1:9001;
+        keepalive 32;
+    }
+
     server {
     server {
         listen       8080;
         listen       8080;
         server_name  localhost;
         server_name  localhost;
@@ -70,7 +76,8 @@ http {
         #
         #
         location ~ \.php$ {
         location ~ \.php$ {
             try_files $uri =404;
             try_files $uri =404;
-            fastcgi_pass   127.0.0.1:9001;
+            fastcgi_pass   fastcgi_backend;
+            fastcgi_keep_conn on;
             fastcgi_index  index.php;
             fastcgi_index  index.php;
 #            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
 #            fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
             fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
@@ -122,4 +129,4 @@ http {
     #    }
     #    }
     #}
     #}
 
 
-}
+}