Skip to content

Commit e3afaca

Browse files
committed
add njs module
1 parent 7b9af1b commit e3afaca

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

nginx-build.sh

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ NGINX_VERSION=1.23.2
1414
NGX_DEVEL_KIT_VERSION=0.3.1
1515
NGX_SET_MISC_MOD_VERSION=0.33
1616
NGX_HEADERS_MORE_MOD_VERSION=0.34
17+
NGX_NJS_MOD_VERSION=0.7.9
1718

1819
NGINX_SRC_URL=http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
1920
NGX_DEVEL_KIT_SRC_URL=https://github.com/vision5/ngx_devel_kit/archive/refs/tags/v${NGX_DEVEL_KIT_VERSION}.tar.gz
2021
NGX_SET_MISC_MOD_SRC_URL=https://github.com/openresty/set-misc-nginx-module/archive/refs/tags/v${NGX_SET_MISC_MOD_VERSION}.tar.gz
2122
NGX_HEADERS_MORE_MOD_SRC_URL=https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v${NGX_HEADERS_MORE_MOD_VERSION}.tar.gz
23+
NGX_NJS_MOD_SRC_URL=http://hg.nginx.org/njs/archive/${NGX_NJS_MOD_VERSION}.tar.gz
2224

2325
if [ -z "$1" ]; then
2426
echo "missing required argument: absolute path of the output binary"
@@ -33,9 +35,9 @@ tar zxf nginx.tar.gz
3335
rm -f nginx.tar.gz
3436

3537
# download NGINX development kit module source.
36-
wget -O ngx_devel_kit.tar.gz ${NGX_DEVEL_KIT_SRC_URL}
37-
tar zxf ngx_devel_kit.tar.gz
38-
rm -f ngx_devel_kit.tar.gz
38+
wget -O ngx-devel-kit.tar.gz ${NGX_DEVEL_KIT_SRC_URL}
39+
tar zxf ngx-devel-kit.tar.gz
40+
rm -f ngx-devel-kit.tar.gz
3941

4042
# download nginx set misc module source.
4143
wget -O set-misc-nginx-module.tar.gz ${NGX_SET_MISC_MOD_SRC_URL}
@@ -47,6 +49,11 @@ wget -O headers-more-nginx-module.tar.gz ${NGX_HEADERS_MORE_MOD_SRC_URL}
4749
tar zxf headers-more-nginx-module.tar.gz
4850
rm -f headers-more-nginx-module.tar.gz
4951

52+
# download njs module source.
53+
wget -O njs-module.tar.gz ${NGX_NJS_MOD_SRC_URL}
54+
tar zxf njs-module.tar.gz
55+
rm -f njs-module.tar.gz
56+
5057
cd nginx-${NGINX_VERSION} || exit 1
5158
./configure \
5259
--prefix=/etc/nginx \
@@ -65,7 +72,8 @@ cd nginx-${NGINX_VERSION} || exit 1
6572
--without-mail_smtp_module \
6673
--add-module=../ngx_devel_kit-${NGX_DEVEL_KIT_VERSION} \
6774
--add-module=../set-misc-nginx-module-${NGX_SET_MISC_MOD_VERSION} \
68-
--add-module=../headers-more-nginx-module-${NGX_HEADERS_MORE_MOD_VERSION}
75+
--add-module=../headers-more-nginx-module-${NGX_HEADERS_MORE_MOD_VERSION} \
76+
--add-module=../njs-${NGX_NJS_MOD_VERSION}/nginx
6977

7078
make -j"$(nproc)"
7179
make install -j"$(nproc)"

0 commit comments

Comments
 (0)