Skip to content

Commit 3897894

Browse files
committed
Merge pull request TechEmpower#1570 from bratao/patch-3
Laravel: Tweak nginx settings
2 parents 4fb2c99 + a7023d9 commit 3897894

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

frameworks/PHP/php-laravel/deploy/nginx.conf

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
11
worker_processes 8;
22

33
events {
4-
worker_connections 1024;
4+
worker_connections 2048;
5+
multi_accept on;
6+
use epoll;
57
}
68

79
http {
810
include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/mime.types;
911
default_type application/octet-stream;
1012
access_log off;
1113

12-
sendfile on;
13-
keepalive_timeout 65;
14+
sendfile on;
15+
tcp_nopush on;
16+
tcp_nodelay on;
17+
keepalive_timeout 65;
18+
19+
open_file_cache max=2000 inactive=20s;
20+
open_file_cache_valid 60s;
21+
open_file_cache_min_uses 5;
22+
open_file_cache_errors off;
23+
24+
#FastCGI optimizations
25+
fastcgi_buffers 256 16k;
26+
fastcgi_buffer_size 128k;
27+
fastcgi_connect_timeout 30s;
28+
fastcgi_send_timeout 60s;
29+
fastcgi_read_timeout 60s;
30+
fastcgi_busy_buffers_size 256k;
31+
fastcgi_temp_file_write_size 256k;
32+
reset_timedout_connection on;
33+
server_names_hash_bucket_size 100;
34+
1435

1536
upstream fastcgi_backend {
1637
server 127.0.0.1:9001;
@@ -39,4 +60,4 @@ http {
3960
include /home/vagrant/FrameworkBenchmarks/installs/nginx/conf/fastcgi_params;
4061
}
4162
}
42-
}
63+
}

0 commit comments

Comments
 (0)