How to fix: Apache version disclosed in 404 / error pages
Default Apache error pages expose the full server version, loaded modules, and OS in the footer (e.g., 'Apache/2.4.57 (CentOS) Server at example.com Port 443').
Why it matters
Knowing the exact Apache version, loaded modules (e.g., mod_ssl version, mod_php), and OS distribution makes it trivial to identify applicable CVEs without additional scanning. The 'Server at host Port N' footer also confirms the virtual host name and port in use.
Apache by default appends a detailed signature to all error pages and the Server header. A single 404 request reveals the Apache version, OS, and active modules. Two directives in httpd.conf suppress this completely.
How to fix it
- 1Set 'ServerTokens Prod' in httpd.conf to reveal only 'Apache' without a version number.
- 2Set 'ServerSignature Off' to remove the version footer from error pages.
- 3Use custom ErrorDocument directives for 4xx and 5xx responses.
- 4Keep Apache updated regardless of whether version disclosure is suppressed.
Code examples
Apache (httpd.conf)
# Reveal only the product name, no version or OS
ServerTokens Prod
# Remove the 'Apache/version Server at host' footer from error pages
ServerSignature Off
# Custom error pages
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.htmlReferences
Detected automatically by VulnRadar. The check id is apache-version-404-disclosure, stable across every scan so you can filter or diff on it.
More info disclosure checks
- MediumRails Session Cookie Missing HttpOnly Flag
- InfoServer header truncated
- InfoPHP session cookie naming exposes runtime
- Infoconfig.js / settings.js referenced (verify contents)
- Infoenv.js / environment.js referenced (verify contents)
- InfoSitemap.xml publicly accessible
- InfoOpenAPI schema version exposed in URL
- LowCORS exposes internal CDN hostname
Questions
- How severe is Apache version disclosed in 404 / error pages?
- VulnRadar rates this low severity in the info disclosure category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
- Does VulnRadar check for this automatically?
- Yes. It runs as part of every scan under the check id apache-version-404-disclosure, which stays the same between runs so you can filter, diff, or gate CI on it.
- Which standards does Apache version disclosed in 404 / error pages map to?
- It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.
Missing a check?
The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.