The nginx build
9 answers
Rebuilding nginx, and upgrading the manager.
Looking for something specific
The searchable index covers all 326 answers at once and filters as you type.
296 Rebuild nginx from the GUI
Fleet, NGINX Build. Run the check button first, every time: it works out what a rebuild would do without doing it, including whether your current configuration would still be accepted.
Then press Rebuild. The new nginx is built while the old one carries on serving, your config is tested against it, and only if that passes is the running nginx replaced.
297 Rebuild one node at a time
Rebuild one, check your sites still work, and only then do the second. Rebuilding both at once removes the whole point of having two. If you use DNS failover, take the node out of the answer first.
298 The two nodes show different nginx versions
Fix it. A fleet where they differ is one where a configuration can work on one node and be refused by the other, and the apply then fails with an error that points at your configuration rather than at the real cause. Rebuild the one that is behind.
299 A rebuild failed
The old nginx keeps running, so nothing is down. Read the output on the page: a build failure is nearly always a missing system package or a source that could not be downloaded, and both say so plainly. Fix it and press the button again.
A rebuild does not change your configuration and cannot lose it.
300 Roll back to the previous nginx build
sudo /data/docker/failoverlb/nginx-installer.sh revert
That rolls back to the build from before the last install.
301 Turn on the WAF module in the nginx build
Turning the WAF on in the GUI rebuilds nginx with ModSecurity, using the same path the version upgrades already take, so nobody has to edit a file. From a terminal it is:
sudo WITH_MODSECURITY=1 /data/docker/failoverlb/nginx-installer.sh install
It is not built by default because it adds about two minutes to a four minute build and most installs never switch it on.
302 Never install the distro nginx package
Do not install python3-certbot-nginx or anything else that pulls in Ubuntu's nginx package. It drops a stock binary on top of this build, and you lose every module and the configuration stops loading. The installer sets up guards against this and it is still worth knowing.
303 Add a module to the nginx build
The module list is a plain array near the top of nginx-installer.sh. Add an entry in the same folder|git-url|git-ref shape and rebuild. Do it on one node, confirm it works, then do the other.
304 Upgrade the manager software
cd /data/docker/failoverlb && sudo git pull
sudo /data/docker/failoverlb/install.sh --upgrade
Do every node, minutes apart rather than days, and check the Cluster page in between. It does not touch your configuration or your environment file, and nginx keeps running throughout.