Useful howtos

From LinuxizeNet

Short, tested procedures for the things that come up once a year and are never where you left them.

NGINX[edit]

NGINX underscores in headers
Headers containing underscores are dropped by default. Turn them back on.
underscores_in_headers on;
Self-Signed CA
Issue a wildcard cert with mkcert and get every box on the LAN to trust it.
mkcert -install

CLI commands[edit]

Clean Linux DNS cache
systemd-resolved, nscd and dnsmasq.
resolvectl flush-caches
Clean macOS DNS cache
Flush the resolver and restart mDNSResponder.
dscacheutil -flushcache
Clean Windows DNS cache
From an elevated prompt.
ipconfig /flushdns

Linux[edit]

Linux subsystem in Windows
Enabling and installing WSL.
wsl --install
Downgrading Ansible Engine on CentOS 7
Pinning a working release when the latest breaks your playbooks.
yum downgrade ansible
SpamAssassin manual learning
Feeding ham and spam to the Bayes classifier by hand.
sa-learn --spam
Sudo nopasswd
Dropping the password prompt for a user or a group.
NOPASSWD: ALL
Perl warnings
Silencing locale warnings on a fresh install.

Networking[edit]

SYS-4-CONFIG_RESOLVE_FAILURE
What the Cisco log message means and how to stop it.
no ip domain-lookup