From e8a05d1e558f471febed3543c4399f25296e41ef Mon Sep 17 00:00:00 2001
From: Mathieu Lutfy <mathieu@bidon.ca>
Date: Tue, 4 Oct 2016 17:07:22 -0400
Subject: [PATCH] Issue #2811377: Nginx and CiviCRM: block access to
 files/civicrm/custom/.

---
 http/Provision/Config/Nginx/Inc/vhost_include.tpl.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php b/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
index 16f4e34..2a97fd6 100644
--- a/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
+++ b/http/Provision/Config/Nginx/Inc/vhost_include.tpl.php
@@ -475,7 +475,7 @@ location ~* /(?:modules|themes|libraries)/.*\.(?:txt|md)$ {
 ###
 ### Deny listed requests for security reasons.
 ###
-location ~* ^/sites/.*/files/civicrm/(?:ConfigAndLog|upload|templates_c) {
+location ~* ^/sites/.*/files/civicrm/(?:ConfigAndLog|custom|upload|templates_c) {
   access_log off;
   return 404;
 }
-- 
2.1.4

