Skip to content

Commit 342c812

Browse files
committed
feature: now this module can be compiled as a dynamic module with NGINX 1.9.11 via the --add-dynamic-module=PATH option of ./configure.
1 parent 5a67f12 commit 342c812

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ your filter modules during nginx configure, for instance
9292

9393
such that `ngx_eval`'s filter works *after* your filter modules.
9494

95+
Starting from NGINX 1.9.11, you can also compile this module as a dynamic module, by using the `--add-dynamic-module=PATH` option instead of `--add-module=PATH` on the
96+
`./configure` command line above. And then you can explicitly load the module in your `nginx.conf` via the [load_module](http://nginx.org/en/docs/ngx_core_module.html#load_module)
97+
directive, for example,
98+
99+
```nginx
100+
load_module /path/to/modules/ngx_http_eval_module.so;
101+
```
102+
95103
[Back to TOC](#table-of-contents)
96104

97105
Use Lua instead
@@ -159,6 +167,8 @@ Nginx Compatibility
159167

160168
The following versions of Nginx should work with this module:
161169

170+
* 1.9.x (last tested: 1.9.7)
171+
* 1.8.x
162172
* 1.7.x (last tested: 1.7.7)
163173
* 1.5.x (last tested: 1.5.12)
164174
* 1.4.x (last tested: 1.4.4)
@@ -224,7 +234,7 @@ This module is licensed under the BSD license.
224234

225235
Copyright (C) 2009-2010, by Valery Kholodkov valery+nginx@grid.net.ru
226236

227-
Copyright (C) 2010-2014, by Yichun "agentzh" Zhang (章亦春) <agentzh@gmail.com>, CloudFlare Inc.
237+
Copyright (C) 2010-2016, by Yichun "agentzh" Zhang (章亦春) <agentzh@gmail.com>, CloudFlare Inc.
228238

229239
All rights reserved.
230240

config

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,19 @@ ngx_addon_name=ngx_http_eval_module
33
EVAL_SRCS="$ngx_addon_dir/src/ngx_http_eval_module.c"
44
EVAL_DEPS="$ngx_addon_dir/src/ddebug.h"
55

6-
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
7-
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $EVAL_SRCS"
8-
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $EVAL_DEPS"
96
CFLAGS="$CFLAGS -DNDK_SET_VAR"
7+
8+
if test -n "$ngx_module_link"; then
9+
ngx_module_type=HTTP_AUX_FILTER
10+
ngx_module_name=$ngx_addon_name
11+
ngx_module_incs=
12+
ngx_module_deps="$EVAL_DEPS"
13+
ngx_module_srcs="$EVAL_SRCS"
14+
ngx_module_libs=
15+
16+
. auto/module
17+
else
18+
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES $ngx_addon_name"
19+
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $EVAL_SRCS"
20+
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $EVAL_DEPS"
21+
fi

0 commit comments

Comments
 (0)