Blueprints · Reverse Proxy & SSL
Beginner
5 min · Nginx
Nginx hide version
Stages server_tokens off. Hiding the version is not a patch.
Baked-in protections
- The version token is hidden
- Nginx is not reloaded
- You still upgrade Nginx
Step 1 · conf
Tokens snippet
/root/portgate-blueprints/server-tokens.conf
Put this in the http block.
server_tokens off;
Step 2 · bash
Read-only check
/root/portgate-blueprints/nginx-version-check.sh
Prints status. It does not change the service.
#!/bin/sh set -eu nginx -v 2>&1 || echo "nginx is not installed."