From 2ce037af5e791c0aada983e5e864ffda1d0810c9 Mon Sep 17 00:00:00 2001 From: David Duque Date: Mon, 20 Apr 2020 13:05:58 +0100 Subject: [PATCH] Modifications to nginx configuration files --- conf/nginx-custom.conf | 18 ++++++++++++++++++ ...ginx-alldomains.conf => nginx-default.conf} | 0 2 files changed, 18 insertions(+) create mode 100644 conf/nginx-custom.conf rename conf/{nginx-alldomains.conf => nginx-default.conf} (100%) diff --git a/conf/nginx-custom.conf b/conf/nginx-custom.conf new file mode 100644 index 00000000..aad87f16 --- /dev/null +++ b/conf/nginx-custom.conf @@ -0,0 +1,18 @@ + # Expose this directory as static files. + root $ROOT; + index index.html index.htm; + + # ADDITIONAL DIRECTIVES HERE + + # Disable viewing dotfiles (.htaccess, .svn, .git, etc.) + # This block is placed at the end. Nginx's precedence rules means this block + # takes precedence over all non-regex matches and only regex matches that + # come after it (i.e. none of those, since this is the last one.) That means + # we're blocking dotfiles in the static hosted sites but not the FastCGI- + # handled locations for Nextcloud (which serves user-uploaded files that might + # have this pattern, see #414) or some of the other services. + location ~ /\.(ht|svn|git|hg|bzr) { + log_not_found off; + access_log off; + deny all; + } diff --git a/conf/nginx-alldomains.conf b/conf/nginx-default.conf similarity index 100% rename from conf/nginx-alldomains.conf rename to conf/nginx-default.conf