Details
Disabling hidden files is a defense-in-depth mechanism to help prevent accidentally exposing sensitive information.
Rationale:
Disabling hidden files prevents an attacker from being able to reference a hidden file that may be put in your location and have sensitive information, like .git files.
Solution
Edit the ‘nginx.conf’ file and add the following line:
location ~ /. { deny all; return 404; }
Supportive Information
The following resource is also helpful.
This security hardening control applies to the following category of controls within NIST 800-53: Configuration Management.This control applies to the following type of system Unix.