0

how to prevent access the hidden files in nginx

hello,

I am new for nginx, i want to how to prevent aaccessing hiddenfiles in nginx.... if any one knows the solutions please help....

Nginx Add a comment
jayden
asked Sep 18 2017

Answer

0

you can use following rule for deny all hidden files and directory, you just add following rule in your nginx configuration file.

location ~ /\. {
            deny  all;
        }
Add a comment
piraisudanrajendran
asked Sep 18 2017
edited Oct 05 2018
Post your Answer