Nginx is compiled with the OPTIONS_FILE_SET+=HTTP_UPLOAD_PROGRESS set. nginx -V shows: ...p_realip_module --with-http_slice_module --with-http_stub_status_module --add-module=/wrkdirs/usr/ports/www/nginx/work/nginx-upload-progress-module-0.9.2 --add-module=/wrkdirs/usr/ports/www/nginx/work/naxsi-0.55.3/naxsi_src --with-pcre --add-dynamic-module=/wrkdirs/usr/ports/www/nginx/work/passenger-5.1.12/src/nginx_module --with-http_v2_module -... So you see the upload-progress module is compiled in. With the update from 1.12.2_4,2 -> 1.12.2_6,2 I see now the following error message: nginx -t nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:38 nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Moin Matthias :-) I do not have the problem. You are the only one who has reported anything like this # nginx -V nginx version: nginx/1.12.2 ..... --with-http_slice_module --with-http_stub_status_module --with-http_sub_module --add-module=/usr/ports/www/nginx/work/nginx-upload-progress-module-0.9.2 --with-pcre --with-http_v2_module..... # nginx -t nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Moin Jochen, have you configured nginx to use it? Just add the following lines to your /usr/local/etc/nginx/nginx.conf: http { ... # Support Upload Progress upload_progress uploads 1m; ... } Maybe then you will see the problem, too.
Created attachment 190099 [details] patch
Heya Matthias, i found this: https://github.com/masterzen/nginx-upload-progress-module/issues/50 Can you please test the attached patch and give me a feedback?
Created attachment 190100 [details] patch
Tested patch https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190100 But it does not work.
(In reply to Matthias Fechner from comment #6) The same error?
yes: nginx -t nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:44 nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
Hi Jochen, is it maybe now a dynamic module which must be loaded manually using a load_module line in the configuration?
hmmmm https://github.com/masterzen/nginx-upload-progress-module/pull/51 If I understand correctly, he fixed it in afb2d31 [1]. So it would be possible to switch to this version [1] https://github.com/masterzen/nginx-upload-progress-module/commit/afb2d31d1277c50bd6215c470ba94b843349e250
Created attachment 190102 [details] testpatch
(In reply to Matthias Fechner from comment #9) The problem is, the documentation is outdated and not up to date: https://github.com/masterzen/nginx-upload-progress-module
(In reply to Matthias Fechner from comment #2) https://www.nginx.com/resources/wiki/modules/upload_progress/#configuration-example Can you tested with "upload_progress proxied 1m;" ?
(In reply to Jochen Neumeister from comment #11) your patch https://bugs.freebsd.org/bugzilla/attachment.cgi?id=190102 fixed it. No configuration changes necessary. Thanks!
I can confirm that the latest official port version nginx-1.12.2_6,2 has a forementioned problem with an upload_progress module: test:/# /usr/local/etc/rc.d/nginx configtest Performing sanity check on nginx configuration: nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:18 nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed After applying Jochen Neumeister's patch from comment #11 it at least pass the config test: test:/# /usr/local/etc/rc.d/nginx configtest Performing sanity check on nginx configuration: nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
A commit references this bug: Author: joneum Date: Sat Jan 27 12:57:24 UTC 2018 New revision: 460121 URL: https://svnweb.freebsd.org/changeset/ports/460121 Log: www/nginx: Fix building of uploadprogress module PR: 225473 Reported by: Matthias Fechner <idefix@fechner.net> Approved by: tcberner (mentor) Differential Revision: https://reviews.freebsd.org/D14069 Changes: head/www/nginx/Makefile head/www/nginx/distinfo head/www/nginx/files/extra-patch-masterzen-nginx-upload-progress-module
Landed. Thanks :-)
The problem reappeared again with the new version nginx-1.12.2_11,2.
(In reply to Matthias Fechner from comment #18) Hi Matthias, Can you confirm if this is fixed in 1.14.0,2 or that the problem persists? Cheers, Bernard.
(In reply to Bernard Spil from comment #19) sry I cannot test it anymore, I removed upload_progress from all my servers as the module is not stable.
I can confirm that this error is NOT fixed in the latest port revision 1.14.0,2: Performing sanity check on nginx configuration: nginx: [emerg] unknown directive "upload_progress" in /usr/local/etc/nginx/nginx.conf:18 nginx: configuration file /usr/local/etc/nginx/nginx.conf test failed
1. Is your nginx built with Dynamic modules 2. Do you load the module in your config load_module "modules/ngx_http_uploadprogress_module";
Created attachment 192813 [details] patch Matthias and Alexey, can you please test this new patch?
(In reply to Bernard Spil from comment #22) After unchecking DSO and rebuilding port everything works fine.
(In reply to Alexey Markov from comment #24) Did you test this with DSO enabled and the module loaded in config?
okay, solved ... and i can delete the patch :-)