From 23140a01e62b874f14b589e1c20fca92f2f887c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Szekeres=20Ba=CC=81lint?= Date: Fri, 23 Nov 2018 07:55:36 +0100 Subject: [PATCH] Drupal: handle private files fixes #41 --- public/templates/conf/nginxconfig.io/drupal.conf.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/public/templates/conf/nginxconfig.io/drupal.conf.html b/public/templates/conf/nginxconfig.io/drupal.conf.html index 938bbfc..57083c4 100644 --- a/public/templates/conf/nginxconfig.io/drupal.conf.html +++ b/public/templates/conf/nginxconfig.io/drupal.conf.html @@ -11,6 +11,11 @@ location ~ ^/sites/[^/]+/files/.*\.php$ { # Drupal: deny php in vendor location ~ /vendor/.*\.php$ { deny all; +} + +# Drupal: handle private files +location ~ ^(/[a-z\-]+)?/system/files/ { + try_files $uri /index.php?$query_string; } # Drupal: throttle user functions