From d1215f09b0a77e2fab3af85a3fa313cad0f2bc7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C6=ACHE=20=D0=AFAW=20=E2=98=A3?= Date: Thu, 29 Dec 2022 02:23:56 +0100 Subject: [PATCH] Update nginx.conf --- static/Jammy/nginx.conf | 47 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/static/Jammy/nginx.conf b/static/Jammy/nginx.conf index 2663913..9e764e9 100644 --- a/static/Jammy/nginx.conf +++ b/static/Jammy/nginx.conf @@ -5,8 +5,10 @@ pid /var/run/nginx.pid; worker_processes auto; worker_rlimit_nofile 65535; -load_module /nginx/modules/ngx_http_modsecurity_module.so; +load_module /nginx/modules/ndk_http_module.so; +load_module /nginx/modules/ngx_http_lua_module.so; load_module /nginx/modules/ngx_http_naxsi_module.so; +load_module /nginx/modules/ngx_http_modsecurity_module.so; load_module /nginx/modules/ngx_http_testcookie_access_module.so; events { @@ -16,13 +18,16 @@ events { } http { - # uncomment lua_package_path if you plan to use ngx-lua module. - # scripts path of resty-core and lrucache is /usr/twiylua - #lua_package_path "/usr/twiylua/lib/lua/?.lua;;"; # ////////////////////////////////////////////////////// # - # =================== START L7 ========================= # + # =================== LOAD LUA ========================= # + lua_package_path "/usr/twiylua/lib/lua/?.lua;;"; + # =================== END LUA ========================== # + # ////////////////////////////////////////////////////// # + + # ////////////////////////////////////////////////////// # + # =================== LOAD L7 ========================== # include modsec/l7.conf; - # ===================== END L7 ========================= # + # =================== END L7 =========================== # # ////////////////////////////////////////////////////// # # ////////////////////////////////////////////////////// # @@ -30,20 +35,6 @@ http { log_format main '$remote_addr |==| $status |==| $request |==| $time_local'; # =================== END LOGS ========================= # # ////////////////////////////////////////////////////// # - - # ////////////////////////////////////////////////////// # - # ==================== BACKENDS ======================== # - map $http_upgrade $connection_upgrade { - default upgrade; - '' close; - } - # Example Of Backend - #upstream varnish { - # zone tcp_servers 64k; - # server 10.10.10.39:80; - #} - # =================== END BACKENDS ===================== # - # ////////////////////////////////////////////////////// # # ////////////////////////////////////////////////////// # # ==================== GENERAL ========================= # @@ -66,7 +57,21 @@ http { include /nginx/mime.types; # =================== END GENERAL ====================== # # ////////////////////////////////////////////////////// # - + + # ////////////////////////////////////////////////////// # + # ==================== BACKENDS ======================== # + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + # Example Of Backend + #upstream varnish { + # zone tcp_servers 64k; + # server 10.10.10.39:80; + #} + # =================== END BACKENDS ===================== # + # ////////////////////////////////////////////////////// # + # ////////////////////////////////////////////////////// # # ================ LOAD VHOST +CONFIGS ================= # include live/*;