koddr / useful-playbooks

🚚 Useful Ansible playbooks for easily deploy your website or webapp to absolutely fresh remote virtual server and automation many processes. Only 3 minutes from the playbook run to complete setup server and start it.
https://truewebartisans.com/microservices
MIT License
79 stars 26 forks source link

[QUESTION] Should we use the original configuration arguments when building ngx_brotli? #1

Open luxlogica opened 3 years ago

luxlogica commented 3 years ago

It seems the Brotli installation playbook builds the module like this:

./configure --with-compat --add-dynamic-module=../ngx_brotli

However, the build instructions in the google/ngx_brotli repository warn us that we should use exactly the same configuration options that Nginx was built with, otherwise we will get an error:

"You will need to use exactly the same ./configure arguments as your Nginx configuration and append --with-compat --add-dynamic-module=/path/to/ngx_brotli to the end, otherwise you will get a "module is not binary compatible" error on startup. You can run nginx -V to get the configuration arguments for your Nginx installation."

Should the playbook be getting the configuration arguments with nginx -V, and then using them in the ./configure command?

koddr commented 3 years ago

@luxlogica hi!

Thanks for the question. As far as I know, this warning does not take into account the fact that when you start installing the brotli module, it already uses exactly the same configuration as the installed nginx.

In any case, this playbook has been tested many times already on different VPS and never had a problem with it.

If you have any other comments, please post them.