From 3bcf0893534e9fe9dc27e18d06e776114d80c584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hasan=20=C3=87ALI=C5=9EIR?= Date: Sun, 25 Oct 2026 14:33:06 +0300 Subject: [PATCH] nginx: enable pcre_jit for regex maps --- nginx/nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx/nginx.conf b/nginx/nginx.conf index b59ff0e..5f28e61 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -9,6 +9,12 @@ worker_processes auto; ####### ASYNC BACKGROUND PURGE ###### # thread_pool npp_purge_io threads=2 max_queue=128; +####### PCRE JIT ######## +# Compile every regex (map ~ / ~*, location ~, rewrite) to machine code at +# load/reload time instead of interpreting it per request. Same matching +# result, ~3-4x cheaper regex evaluation. +pcre_jit on; + ####### EVENTS MODULE ######## events { use epoll; # Efficient event-driven model for Linux