Why this matters for PCI DSS
PCI DSS 4.0 Requirement 2.2 mandates that system components are configured securely and that all unnecessary services and functions are removed or disabled. Requirement 2.2.5 specifically calls out that "if any insecure services, protocols, or daemons are present" they must be justified, documented, and have additional security features enabled.
Remove unnecessary exposure, minimize implementation detail, and document any server behavior that must remain enabled for a legitimate business purpose.
How to fix it
Apache — in your main config:
TraceEnable Off
ServerTokens Prod
ServerSignature Off
<Directory /var/www/html>
Options -Indexes
</Directory>
nginx — TRACE is not enabled by default. To strip the version from the banner:
http {
server_tokens off;
autoindex off;
}
ASP.NET / IIS — compile production applications with debugging disabled, disable unnecessary TRACE handling, and remove detailed server banners:
<system.web>
<compilation debug="false" />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<verbs allowUnlisted="true">
<add verb="TRACE" allowed="false" />
<add verb="OPTIONS" allowed="true" />
</verbs>
</requestFiltering>
</security>
<security><requestFiltering removeServerHeader="true" /></security>
</system.webServer>
For X-Powered-By in PHP, edit php.ini: expose_php = Off. In ASP.NET, remove the header in web.config via <httpProtocol><customHeaders><remove name="X-Powered-By" />.
Verify ASP.NET DEBUG handling with curl -i -X DEBUG -H "Command: stop-debug" https://example.com/; a production application must not return a two-character OK body with HTTP 200. Verify TRACE handling with curl -i -X TRACE https://example.com/. Review check 42 for separate WebDAV and method-allowlisting guidance.