Skip to content

Commit 47c8f3c

Browse files
feature: this module can now be compiled as a dynamic module with NGINX (#17)
Co-authored-by: lijunlong <[email protected]>
1 parent dfbad7c commit 47c8f3c

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,14 @@ the version 1.13.6 (see [nginx compatibility](#compatibility)), and then build t
283283

284284
Download the latest version of the release tarball of this module from [rds-json-nginx-module file list](https://github.com/openresty/rds-json-nginx-module/tags).
285285

286+
Starting from NGINX 1.9.11, you can also compile this module as a dynamic module, by using the `--add-dynamic-module=PATH` option
287+
instead of `--add-module=PATH` on the `./configure` command line above.
288+
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) directive, for example,
289+
290+
```nginx
291+
load_module /path/to/modules/ngx_http_rds_json_filter_module.so;
292+
```
293+
286294
Also, this module is included and enabled by default in the [OpenResty bundle](http://openresty.org).
287295

288296
[Back to TOC](#table-of-contents)

config

+28-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
ngx_addon_name=ngx_http_rds_json_filter_module
2-
HTTP_AUX_FILTER_MODULES="$HTTP_AUX_FILTER_MODULES ngx_http_rds_json_filter_module"
3-
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/src/ngx_http_rds_json_filter_module.c $ngx_addon_dir/src/ngx_http_rds_json_processor.c $ngx_addon_dir/src/ngx_http_rds_json_util.c $ngx_addon_dir/src/ngx_http_rds_json_output.c $ngx_addon_dir/src/ngx_http_rds_json_handler.c"
4-
NGX_ADDON_DEPS="$NGX_ADDON_DEPS $ngx_addon_dir/src/ddebug.h $ngx_addon_dir/src/resty_dbd_stream.h $ngx_addon_dir/src/ngx_http_rds_json_filter_module.h $ngx_addon_dir/src/ngx_http_rds_json_processor.h $ngx_addon_dir/src/ngx_http_rds_json_util.h $ngx_addon_dir/src/ngx_http_rds.h $ngx_addon_dir/src/resty_dbd_stream.h $ngx_addon_dir/src/ngx_http_rds_json_output.h $ngx_addon_dir/src/ngx_http_rds_utils.h $ngx_addon_dir/src/ngx_http_rds_json_handler.h"
52

3+
RDS_JSON_FILTER_SRCS=" \
4+
$ngx_addon_dir/src/ngx_http_rds_json_filter_module.c \
5+
$ngx_addon_dir/src/ngx_http_rds_json_processor.c \
6+
$ngx_addon_dir/src/ngx_http_rds_json_util.c \
7+
$ngx_addon_dir/src/ngx_http_rds_json_output.c \
8+
$ngx_addon_dir/src/ngx_http_rds_json_handler.c \
9+
"
10+
11+
RDS_JSON_FILTER_DEPS=" \
12+
$ngx_addon_dir/src/ddebug.h \
13+
$ngx_addon_dir/src/resty_dbd_stream.h \
14+
$ngx_addon_dir/src/ngx_http_rds_json_filter_module.h \
15+
$ngx_addon_dir/src/ngx_http_rds_json_processor.h \
16+
$ngx_addon_dir/src/ngx_http_rds_json_util.h \
17+
$ngx_addon_dir/src/ngx_http_rds.h \
18+
$ngx_addon_dir/src/resty_dbd_stream.h \
19+
$ngx_addon_dir/src/ngx_http_rds_json_output.h \
20+
$ngx_addon_dir/src/ngx_http_rds_utils.h \
21+
$ngx_addon_dir/src/ngx_http_rds_json_handler.h \
22+
"
23+
24+
25+
ngx_module_type=HTTP_AUX_FILTER
26+
ngx_module_name=$ngx_addon_name
27+
ngx_module_srcs="$RDS_JSON_FILTER_SRCS"
28+
ngx_module_deps="$RDS_JSON_FILTER_DEPS"
29+
30+
. auto/module

0 commit comments

Comments
 (0)