From 432ebd3ad7099e6762d626a8dd5464f76e6e4232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=93=99=F0=9D=93=BE=F0=9D=93=B5=F0=9D=93=B2?= =?UTF-8?q?=F0=9D=93=B8?= Date: Wed, 22 May 2024 00:54:24 +0200 Subject: [PATCH] Create nginx.conf --- static/nginx/nginx.conf | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 static/nginx/nginx.conf diff --git a/static/nginx/nginx.conf b/static/nginx/nginx.conf new file mode 100644 index 0000000..424e39c --- /dev/null +++ b/static/nginx/nginx.conf @@ -0,0 +1,57 @@ +# Suggestions? => https://github.com/theraw/The-World-Is-Yours/issues +# Problems? => https://github.com/theraw/The-World-Is-Yours/issues +user nginx; +pid /var/run/nginx.pid; +worker_processes auto; +worker_rlimit_nofile 65535; + +events { + multi_accept on; + use epoll; + worker_connections 65535; +} + +http { + # =================== LOAD LUA ========================= # + lua_package_path "/usr/nginx_lua/lib/lua/?.lua"; + # =================== END LUA ========================== # + + # =================== LOAD L7 ========================== # + include modsec/l7.conf; + # =================== END L7 =========================== # + + # ===================== LOGS =========================== # + log_format main 'DATE: $time_local FROM: $remote_addr | STATUS: $status | TO: $request | CACHE: $upstream_cache_status | A: $http_user_agent'; + # =================== END LOGS ========================= # + + # ==================== GENERAL ========================= # + client_body_buffer_size 2M; + client_header_buffer_size 2M; + client_body_timeout 90s; + client_header_timeout 90s; + client_max_body_size 2M; + keepalive_timeout 15s; + port_in_redirect off; + sendfile on; + server_names_hash_bucket_size 6969; + server_name_in_redirect off; + server_tokens off; + tcp_nodelay on; + tcp_nopush on; + types_hash_max_size 2048; + resolver 1.1.1.1 1.0.0.1; + default_type application/octet-stream; + include /nginx/mime.types; + + map $http_upgrade $connection_upgrade { + default upgrade; + '' close; + } + # =================== END GENERAL ====================== # + + # ================ LOAD VHOST +CONFIGS ================= # + include live/*; + include conf.d/*; + include modsec/naxi.core; + # =================== END CONFIGS ====================== # +}