Skip to content

Commit cec31b9

Browse files
committed
updated config so that module can be used dynamically
1 parent a382c92 commit cec31b9

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ nginx-upload-module
44
This module is based on Nginx upload module (v 2.2.0) http://www.grid.net.ru/nginx/upload.en.html. ...
55
Since it seems the author has not maintained that module. I changed some codes that can be installed with latest nginx.
66

7-
- install
7+
- install (static)
88
./configure --add-module={module_dir} && make && make install
99

10+
- install (dynamic)
11+
./configure --with-compat --add-dynamic-module={module_dir} && make modules
12+
1013
- conf
1114
```
1215
server {

config

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
USE_MD5=YES
2-
USE_SHA1=YES
31
ngx_addon_name=ngx_http_upload_module
4-
HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
5-
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"
2+
3+
if test -n "$ngx_module_link"; then
4+
ngx_module_type=HTTP
5+
ngx_module_name=ngx_http_upload_module
6+
ngx_module_srcs="$ngx_addon_dir/ngx_http_upload_module.c"
7+
8+
. auto/module
9+
else
10+
HTTP_MODULES="$HTTP_MODULES ngx_http_upload_module"
11+
NGX_ADDON_SRCS="$NGX_ADDON_SRCS $ngx_addon_dir/ngx_http_upload_module.c"
12+
fi

0 commit comments

Comments
 (0)