brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: nginx -V lists the modules your build has before you use a directive

Nginx
~/tips/tip-nginx-show-compiled-modules

nginx -V 2>&1 | tr ' ' '\n' | grep -- --with-

Shows the configure flags and modules of the installed nginx binary.

“unknown directive” after a config change usually means the module is not compiled into this nginx build.

nginx -V 2>&1 | tr ' ' '\n' | grep -- --with-

Capital -V prints the version, the compiler and the configure arguments, and it writes to standard error, which is why the example adds 2>&1. Look for flags such as --with-http_v2_module or --with-http_realip_module. Lowercase -v only prints the version. Distro packages, the nginx.org packages and Docker images are built with different module sets, so check on the machine you deploy to, not on your laptop. A directive from a module that is missing stops nginx from starting at all.

Further reading: nginx command-line parameters

Going deeper: 🛜 Guide: AdGuard Home + Tailscale (Secure Split-Horizon DNS)

More Nginx tips sudo certbot --nginx -d example.com -d www.example.com /data/nginx/custom/server_redirect.conf map $http_upgrade $connection_upgrade { proxy_intercept_errors on; proxy_redirect http://localhost:3000/ /app/; All Nginx tips (50) All topics

Link