Problem with 'dynamically loadable module' support.
migmedia opened this issue · comments
When I build nginx 1.11.5 (dev) with v0.9.2 nginx -t
returns
nginx: [emerg] unknown directive "upload_progress" in /etc/nginx/nginx.conf:86
nginx: configuration file /etc/nginx/nginx.conf test failed
when I switch back to upload progress v0.9.1 it works as expected.
The same happens with nginx 1.10.1 (stable)
37182ce seems to be the only difference.
How can I use this module statically as before?
@Whissi thanks for pointing me to the Nginx documentation bug.
So if I understand correctly, this can be fixed with this modification:
if [ $ngx_module_link = DYNAMIC ] ; then
ngx_module_type=FILTER
ngx_module_name=ngx_http_uploadprogress_module
ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c"
. auto/module
elif [ $ngx_module_link = ADDON ] ; then
ngx_module_type=CORE
ngx_module_name=ngx_http_uploadprogress_module
ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c"
. auto/module
ngx_module_type=FILTER
ngx_module_name=ngx_http_uploadprogress_module
ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c"
. auto/module
fi
@migmedia I won't have the time to test before a couple of days, can you try for me and report success/failure?
I am currently preparing a fix for Gentoo. My PR will look different:
diff --git a/config b/config
index 364af8c..d704460 100644
--- a/config
+++ b/config
@@ -1,5 +1,5 @@
ngx_addon_name=ngx_http_uploadprogress_module
-if test -n "$ngx_module_link"; then
+if [ $ngx_module_link = DYNAMIC ] ; then
ngx_module_type=FILTER
ngx_module_name=ngx_http_uploadprogress_module
ngx_module_srcs="$ngx_addon_dir/ngx_http_uploadprogress_module.c"
...as I don't see that your module has a CORE module.