From 20759103b06b27bcaaf6e160117cdf3c5ed63ae4 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Sun, 5 Jul 2020 22:51:49 +0200 Subject: [PATCH] Add nginx lua module form openresty --- etc/nginx/nginx.conf | 2 ++ install_binaries.sh | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/etc/nginx/nginx.conf b/etc/nginx/nginx.conf index 362db0b..727acdd 100644 --- a/etc/nginx/nginx.conf +++ b/etc/nginx/nginx.conf @@ -12,6 +12,7 @@ events { } http { + lua_package_path "/usr/local/lib/lua/?.lua;;"; ## # Basic Settings ## @@ -117,5 +118,6 @@ http { } stream { + lua_package_path "/usr/local/lib/lua/?.lua;;"; include /etc/nginx/streams-enabled/*; } diff --git a/install_binaries.sh b/install_binaries.sh index 4ac8c7c..11f8f26 100755 --- a/install_binaries.sh +++ b/install_binaries.sh @@ -2,6 +2,19 @@ git clone https://github.com/nginx/nginx cd nginx git clone https://github.com/google/ngx_brotli +git clone https://github.com/vision5/ngx_devel_kit +git clone https://github.com/openresty/luajit2 +git clone https://github.com/openresty/lua-resty-core +git clone https://github.com/openresty/lua-resty-lrucache +git clone https://github.com/openresty/lua-nginx-module +git clone https://github.com/openresty/stream-lua-nginx-module +cd luajit2 +XCFLAGS="-O3 -march=native -mtune=native" make -j $(nproc) install +cd ../lua-resty-core +make -j $(nproc) install +cd ../lua-resty-lrucache +make -j $(nproc) install +cd .. # apply dynamic TLS record and HTTP2 HPACK patch by CloudFlare cat <