Browse Source

Merge pull request #1570 from bratao/patch-3

Laravel: Tweak nginx settings
Hamilton Turner 10 years ago
parent
commit
3897894cfd
1 changed files with 25 additions and 4 deletions
  1. 25 4
      frameworks/PHP/php-laravel/deploy/nginx.conf

+ 25 - 4
frameworks/PHP/php-laravel/deploy/nginx.conf

@@ -1,7 +1,9 @@
 worker_processes  8;
 
 events {
-    worker_connections  1024;
+    worker_connections 2048;
+	multi_accept on;
+	use epoll;
 }
 
 http {
@@ -9,8 +11,27 @@ http {
     default_type  application/octet-stream;
     access_log off;
 
-    sendfile        on;
-    keepalive_timeout  65;
+    sendfile on;
+    tcp_nopush on;
+    tcp_nodelay on;
+    keepalive_timeout 65;
+	
+    open_file_cache max=2000 inactive=20s;
+    open_file_cache_valid 60s;
+    open_file_cache_min_uses 5;
+    open_file_cache_errors off; 
+
+    #FastCGI optimizations
+    fastcgi_buffers 256 16k;
+    fastcgi_buffer_size 128k;
+    fastcgi_connect_timeout 30s;
+    fastcgi_send_timeout 60s;
+    fastcgi_read_timeout 60s;
+    fastcgi_busy_buffers_size 256k;
+    fastcgi_temp_file_write_size 256k;
+    reset_timedout_connection on;
+    server_names_hash_bucket_size 100;
+	
 
     upstream fastcgi_backend {
         server 127.0.0.1:9001;
@@ -39,4 +60,4 @@ http {
             include        /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/fastcgi_params;
         }
     }
-}
+}