Explorar o código

修改缓存配置,新增 lua 配置

zjcqoo %!s(int64=6) %!d(string=hai) anos
pai
achega
4f0118f728
Modificáronse 1 ficheiros con 10 adicións e 2 borrados
  1. 10 2
      nginx.conf

+ 10 - 2
nginx.conf

@@ -37,8 +37,8 @@ http {
 
   proxy_cache_path        cache
     levels=1:2
-    keys_zone=my_cache:8m
-    max_size=10g
+    keys_zone=my_cache:32m
+    max_size=20g
     inactive=6h
     use_temp_path=off
   ;
@@ -50,6 +50,14 @@ http {
   proxy_busy_buffers_size 64k;
   proxy_send_timeout      10s;
 
+  # traffic statistics
+  lua_shared_dict         traff   16k;
+
+  lua_package_path        ./lua/?.lua;
+  init_by_lua_file        ../lua/init.lua;
+  init_worker_by_lua_file ../lua/worker.lua;
+  log_by_lua              require('g').inc();
+
   map $http_origin $_origin_id {
     include               allowed-sites.conf;
   }