Skip to content

Commit 5181b0f

Browse files
authored
Support Dynamic Module NGINX ≥ 1.9.11 (#4)
1 parent 337aaa1 commit 5181b0f

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,16 @@ Installation:
1313
You'll need to re-compile Nginx from source to include this module.
1414
Modify your compile of Nginx by adding the following directive (modified to suit your path of course):
1515

16+
Static module (built-in nginx binary)
17+
1618
./configure --add-module=/absolute/path/to/nginx-hmac-secure-link
19+
20+
Dynamic nginx module `ngx_http_hmac_secure_link_module.so` module
21+
22+
./configure --add-dynamic-module=/absolute/path/to/nginx-hmac-secure-link
23+
24+
Build Nginx
25+
1726
make
1827
make install
1928

config

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
ngx_addon_name=ngx_http_hmac_secure_link_module
2-
HTTP_MODULES="$HTTP_MODULES ngx_http_hmac_secure_link_module"
3-
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_hmac_secure_link_module.c"
4-
CORE_LIBS="$CORE_LIBS -lssl"
2+
3+
if test -n "$ngx_module_link"; then
4+
ngx_module_type=HTTP
5+
ngx_module_name=ngx_http_hmac_secure_link_module
6+
ngx_module_srcs="$ngx_addon_dir/ngx_http_hmac_secure_link_module.c"
7+
ngx_module_libs="-lcrypto"
8+
9+
. auto/module
10+
else
11+
HTTP_MODULES="$HTTP_MODULES ngx_http_hmac_secure_link_module"
12+
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_hmac_secure_link_module.c"
13+
CORE_LIBS="$CORE_LIBS -lcrypto"
14+
fi

0 commit comments

Comments
 (0)