Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why on earth is this so complicated to install in Ubuntu AND have it auto-update? #140

Open
FlowsterApp opened this issue Oct 31, 2022 · 6 comments

Comments

@FlowsterApp
Copy link

I'm hoping I just suck at Googling 😜 and there's a much simpler solution out there that I just haven't found yet.

So initially we followed these instructions: https://github.com/google/ngx_brotli#installation

And it was working fine for weeks. But then we upgraded packages on the server (apt update; apt upgrade), and rebooted the server, and then sadly nginx would not start.

The error log showed:
[emerg] 3436#3436: module "/etc/nginx/modules/ngx_http_brotli_filter_module.so" version 1022000 instead of 1022001 in /etc/nginx/nginx.conf:10

So in order to get nginx back up as quick as possible, we simply commented-out all the brotli-related links in nginx.conf and started it up.

I guess this means the "install process" listed above is for a 1-time manual install, and package updates don't work properly after that point? 🤔

So then we found this guide, but holy moly is it ever complicated. It seems like there's too many moving parts and something could definitely break in the future:
https://devopsan.com/how-to-install-auto-upgrade-nginx-brotli-module-on-ubuntu/

Is there really no simple way to install brotli w/ nginx on Ubuntu AND have it automatically update without breaking nginx? 😬

Thanks in advance!

@dhanushreddy291
Copy link

and don't even talk about installing this on an NGINX Docker container. I have been stuck since 2 days.
Looks like NGINX Plus has all features prebuilt and NGINX Opensource is where all the manual labor work is being done.

@abcfy2
Copy link

abcfy2 commented Nov 24, 2022

There's someone already built deb for you. You may try https://github.com/darylounet/libnginx-mod-brotli

@jnoordsij
Copy link
Contributor

and don't even talk about installing this on an NGINX Docker container. I have been stuck since 2 days. Looks like NGINX Plus has all features prebuilt and NGINX Opensource is where all the manual labor work is being done.

Actually the official nginx docker image has a very nice of example on how to install additional modules, see
https://github.com/nginxinc/docker-nginx/tree/master/modules. As this module is part of pkg-oss, simply passing ENABLED_MODULES="brotli" will work.

@kkgowtamasa
Copy link

any solution is much appreciated. Right now I'm trying to use the docker image georgjung/nginx-brotli but again precomplied / already compressed static assets are not getting de-compressed when the application is launched on chrome.

@Danrancan
Copy link

Unless you are using a repository that automatically provides this module, you need to compile the module from source with each update. Then add the dynamic modules to your Nginx modules directory. Be sure to compile against the updated nginx, not the old one.

@vardumper
Copy link

There seems to be pre-compiled packages one can install with apt.

apt install libnginx-mod-http-brotli-filter
apt install libnginx-mod-http-brotli-static

Unfortunately these don't seem to be compatible with the latest versions of nginx (as of today nginx 1.26.2 stable or 1.27.2 mainline).

sudo apt-get install nginx=1.24.0-2ubuntu7.1
sudo apt-mark hold nginx

So prior, one has to downgrade nginx. And I'm not sure if I like this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants