Browse Source

Optimize Nginx conf (#4340)

* Delete nginx cache file
It isn't necessary, we are not sending static files

* Optimize nginx conf
Sendfile and tcp_nopush are for static files
Joan Miquel 6 năm trước cách đây
mục cha
commit
cf73cd89e2
2 tập tin đã thay đổi với 6 bổ sung11 xóa
  1. 4 4
      frameworks/C/nginx/nginx.conf
  2. 2 7
      frameworks/PHP/php/deploy/nginx_php.conf

+ 4 - 4
frameworks/C/nginx/nginx.conf

@@ -7,7 +7,7 @@ daemon off;
 
 events {
     worker_connections 32768;
-	multi_accept off;
+	multi_accept off; #default
 }
 
 http {
@@ -15,9 +15,9 @@ http {
     access_log off;
     server_tokens off;
 
-    sendfile on;
-    tcp_nopush on;
-    tcp_nodelay on;
+    sendfile off; #default
+    tcp_nopush off; #default
+    tcp_nodelay on; #default
     keepalive_timeout 65;
 
     server {

+ 2 - 7
frameworks/PHP/php/deploy/nginx_php.conf

@@ -14,16 +14,11 @@ http {
     access_log off;
     server_tokens off;
 
-    sendfile on;
-    tcp_nopush on;
+    sendfile off;
+    tcp_nopush off;
     tcp_nodelay on;
     keepalive_timeout 65s;
 
-    open_file_cache max=2000 inactive=20s;
-    open_file_cache_valid 60s;
-    open_file_cache_min_uses 5;
-    open_file_cache_errors off;
-
     php_ini_path /deploy/conf/php.ini;
 
     server {