Nginx 1.12 package seems have some issues regarding modules.

Asked by Simon Vikström

Hi!

Im looking into using the nginx 1.12 package built here but there seems to be some issues.

I might be wrong but in nginx 1.12 the module needs to be compiled with the same config-options as the nginx-binary (or at least include the same --add-dynamic-module) or else you'll get "..is not binary compatible"

Ref : https://www.rubysecurity.org/compiling-nginx-dynamically-loadable-modules

Nginx 1.12 currently builds nginx-core without any modules configured and later depends on them in the control-file and that makes include /etc/nginx/modules-enable/*.conf ; fail (this is probably true for some of the other versions too).

Wouldn't it be better to build all the dynamic modules with all the nginx-versions and include the ones "needed"?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nginx Edit question
Assignee:
Thomas Ward Edit question
Solved by:
Simon Vikström
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Ward (teward) said :
#1

I'm not sure I understand the core issue here. The dynamic modules brought in here by the packages for core and the other flavors *do* build the dynamic modules whenever the package is created and build for that nginx version. All the dynamic modules in the package are rebuilt with every package upload to the repositories.

If I also remember right we have some core modules that actually *do* get statically built into the executable as not every module in the upstream code is dynamic compatible yet.

What's unclear is where you are encountering problems. Can you provide examples of where you're seeing an actual problem here? (Note that every time you upgrade a version any additional modules *not* built by the package itself needs to be recompiled - this is a downside to how nginx has designed their dynamic modules system currently)

Revision history for this message
Simon Vikström (simonvik) said :
#2

Hm. cant recreate it now, seems like a failed on something before, the package looks good on a clean server.

Revision history for this message
Simon Vikström (simonvik) said :
#3

Hm. cant recreate it now, seems like a failed on something before, the package looks good on a clean server.

Revision history for this message
Sébastien Fievet (zyegfryed) said :
#4

Hi,

I've got bitten by the "..is not binary compatible" message when adding a dynamic module that is not listed into the compilation options (for example: when trying to add the pagespeed module).

After some search [1], it looks like that adding the `--with-compat` flag when compiling nginx allows support for 3rd parties dynamic modules compiled afterward.

Do you think it's legit to add that flag, or is there some security reason (or others) for not going this way?

[1]: https://www.nginx.com/blog/compiling-dynamic-modules-nginx-plus/