From f8eddfd1d5ba32cfabf413b1252db75295162655 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 3 Oct 2021 18:27:35 +0200 Subject: [PATCH] fix(QuickUpload): nginx direct access alias --- config.example.php | 4 +++- modules/quickupload/nginx_quickupload.conf | 8 ++++---- nginx.conf.template | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/config.example.php b/config.example.php index c74cb50..0b1b94f 100644 --- a/config.example.php +++ b/config.example.php @@ -3,7 +3,9 @@ return [ 'domain' => 'lefuturiste.fr', 'modules' => [ - 'modules' => [], + 'modules' => [ + 'alias' => ['web-utils', 'utils', 'help-utils', 'help-modules', 'modules-list'] + ], 'random' => [], 'date' => [ 'alias' => ['printdate'] diff --git a/modules/quickupload/nginx_quickupload.conf b/modules/quickupload/nginx_quickupload.conf index 34f1ee3..c77c268 100644 --- a/modules/quickupload/nginx_quickupload.conf +++ b/modules/quickupload/nginx_quickupload.conf @@ -1,4 +1,4 @@ -location /file/ { - alias {{ROOT_PATH}}/tmp/quickupload; - autoindex off; -} + location /file/ { + alias {{ROOT_PATH}}/tmp/quickupload/; + autoindex off; + } diff --git a/nginx.conf.template b/nginx.conf.template index 09297ea..db31cff 100644 --- a/nginx.conf.template +++ b/nginx.conf.template @@ -2,10 +2,12 @@ server { index index.html index.php; root {{ROOT_PATH}}; server_name {{SERVER_NAME}}; + +{{CUSTOM_CONFIG}} + location / { try_files $uri $uri/ /index.php?$args; } - {{CUSTOM_CONFIG}} location ^~ /wp-admin { return 403; }