This little script compiles Nginx from source with Brotli support. In particular, it uses https://github.com/google/ngx_brotli (earlier used https://github.com/eustas/ngx_brotli/) to compile Nginx.
- Debian 9
- Ubuntu 16.04, Ubuntu 18.04 and Ubuntu 20.04
- Linux Mint 19 Tara
- Stable versions: 1.16, 1.18 and 1.20
- Mainline versions: 1.17, 1.19
It compiles Nginx from source and creates two .deb
files...
- nginx_version~os_arch.deb
- nginx-dbg_version~os_arch.deb
Both files depend on each other. So, one can not work, if other is not installled.
Run the script as root
and the script tries to install the .deb
files automatically, replacing the existing Nginx installation.
Or you can install manually using sudo dpkg -i nginx*.deb
, once you have the .deb
files at the end of the execution of the script.
Download the script (and gcc patch file, if needed), go through what it does (note: never trust any script on the internet) and execute it as a user with sudo privilege. It may take a while to compile depending on the memory and CPU in your server.
- Rafał Michalski - provided patch for gcc-8 and brought a number of best practices to this script.
- Eugene Kliuchnikov - this script is based on his work at https://github.com/eustas/ngx_brotli.
- https://github.com/google/ngx_brotli - Original work on brotli for Nginx by Google.