4508-nginx-defindex-NGINX default index page should not reference NGINX fields
Rule ID
Category
Level
Compatible Versions
Description
- NGINX's default error and index.html pages display the server as NGINX. These default pages should be removed or modified so that they do not advertise the server's underlying infrastructure.
Scan Frequency
Rationale
- By gathering information about the server, attackers can target known vulnerabilities. Removing pages that show the server is running NGINX helps reduce targeted attacks against the server.
Risk Item
Audit Method
- Execute the following commands to verify:
grep -i nginx /usr/share/nginx/html/index.html
grep -i nginx /usr/share/nginx/html/50x.html
grep -i nginx /usr/share/nginx/html/404.html
# The output should not contain the 'nginx' string
- Edit these files:
/usr/share/nginx/html/index.html
/usr/share/nginx/html/50x.html
/usr/share/nginx/html/404.html
Remove the relevant fields and lines containing NGINX.
Impact
Default Value
- By default, these files contain NGINX fields.
References
CIS Controls