# Read more in https://www.nginx.com/resources/wiki/start/topics/recipes/drupal/ location ~\.(txt|log|conf|ini|composer|lock|xls|ods|xlsx|doc|docx|csv)$ { deny all; } # Block access to "hidden" files and directories whose names begin with a # period. This includes directories used by version control systems such # as Subversion or Git to store control files. location ~ (^|/)\. { deny all; }