Wiki / Version disclosure

Warning: Server header reveals the versionServer: nginx/1.26.3

The web server states its exact version in every response. That is not a hole in itself, but it is the line automated scanners filter on when they look for one specific vulnerable version. Low urgency: one line fixes it.

What it does not mean. It does not mean the server is outdated or vulnerable. The reverse holds too: hiding the number patches nothing. An old server stays exactly as exploitable and only drops out of the simplest filter. On Debian and similar systems the number can also look older than the software is, because security fixes are backported into the same version without changing it.

Aleksandr IzmalkovFacts checked:

In our report
Warning (yellow), category weight 0.5 of 2.0
Time to fix
5 minutes plus a reload of the server configuration
Can it break things
Only if you put ServerTokens into .htaccess: the site returns 500

How to fix it

Hiding the version takes a minute, but the real job is updating the server. Do both, the update first.

nginx (tested on 1.26.3)

server_tokens off;

Goes into http, server or location. Before: Server: nginx/1.26.3, and the same string at the bottom of error pages. After: Server: nginx in both places. The word nginx stays: only the commercial nginx can switch the header off entirely, and stock 1.26.3 rejects the third-party more_clear_headers as an unknown directive.

Apache (tested on 2.4.59)

ServerTokens Prod
ServerSignature Off

Main server configuration only: ServerTokens applies to the whole server and cannot be set per virtual host. Before: Server: Apache/2.4.59 (Unix). After: Server: Apache. ServerSignature Off is the default; if someone switched it On, the version is printed again at the bottom of error pages. On shared hosting only the provider can change this setting.

Terminal: the Server response header of nginx and Apache with the version before the change and without it after
Test nginx 1.26.3 and Apache 2.4.59 on 18 November 2026: after the change only the product name is left.

How to check

curl -sI https://example.com | grep -i '^server'

Expected

server: nginx

No digits should remain in the value. If the site sits behind Cloudflare or another proxy you will see the proxy's name (aguard.lt answers server: cloudflare), not your own server's.

What can break

  • ServerTokens in .htaccess: our test Apache 2.4.59 answered every request with 500 and logged “ServerTokens not allowed here”. ServerSignature is allowed in .htaccess.
  • The Apache documentation advises against going below Min, because it makes interoperability problems harder to debug, and says outright that hiding the header does nothing to make the server more secure. If your monitoring or inventory tool reads the version from the header, it will stop seeing it.

Possible values

Apache ServerTokens values and what our test 2.4.59 returned with each. The report line stays yellow as long as the header contains a single digit.

ValueWhat the server sendsReport line
Full (default) or OSServer: Apache/2.4.59 (Unix)Warning
MinServer: Apache/2.4.59Warning
MinorServer: Apache/2.4Warning
MajorServer: Apache/2Warning
ProdServer: ApacheOK

Our data

0.25%

of 73,386 inspected .lt websites (183) ran Apache 2.2 or older. The final release of the 2.2 branch, 2.2.34, came out in July 2017; it gets no security fixes any more. Dataset, 16 November 2026

Sources

Next