Skip to content

Commit 60883e3

Browse files
committed
updated README.md: added section about building dynamic module
1 parent d62bbaa commit 60883e3

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Table of Contents
1515
* [Install](#install)
1616
* [select patch](#select-patch)
1717
* [build nginx](#build-nginx)
18+
* [build as a dynamic module](#build-as-a-dynamic-module)
1819
* [build OpenResty](#build-openresty)
1920
* [Directive](#directive)
2021
* [proxy_connect](#proxy_connect)
@@ -189,6 +190,29 @@ $ ./configure --add-module=/path/to/ngx_http_proxy_connect_module
189190
$ make && make install
190191
```
191192

193+
Build as a dynamic module
194+
-------------------------
195+
196+
* 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 `./configure` command line.
197+
198+
```bash
199+
$ $ wget http://nginx.org/download/nginx-1.9.12.tar.gz
200+
$ tar -xzvf nginx-1.9.12.tar.gz
201+
$ cd nginx-1.9.12/
202+
$ patch -p1 < /path/to/ngx_http_proxy_connect_module/patch/proxy_connect.patch
203+
$ ./configure --add-dynamic-module=/path/to/ngx_http_proxy_connect_module
204+
$ make && make install
205+
```
206+
207+
* And then you can explicitly load the module in your nginx.conf via the `load_module` directive, for example,
208+
209+
```
210+
load_module /path/to/modules/ngx_http_proxy_connect_module.so;
211+
```
212+
213+
* :exclamation: Note that the ngx_http_proxy_connect_module.so file MUST be loaded by nginx binary that is compiled with the .so file at the same time.
214+
215+
192216
Build OpenResty
193217
---------------
194218

0 commit comments

Comments
 (0)