Deny access to locations and directories

in Nginx configuration

If you want to protect a directory from being accessed through the web, create a location and deny access to it:

location ~ /some/location { 
    deny all;

    location ~ \.php$ {
        deny all;
    }
}

0