From: ArthurHoaro Date: Wed, 21 Oct 2020 13:23:30 +0000 (+0200) Subject: Fix: nginx - add rule to disable url-rewriting for the docs X-Git-Tag: v0.12.1^2~29^2 X-Git-Url: https://git.immae.eu/?p=github%2Fshaarli%2FShaarli.git;a=commitdiff_plain;h=2f87bfdc69052cd64e84b1d2b97a0af14991a385 Fix: nginx - add rule to disable url-rewriting for the docs Related to #1603 --- diff --git a/.docker/nginx.conf b/.docker/nginx.conf index 07fba33f..023f52c1 100644 --- a/.docker/nginx.conf +++ b/.docker/nginx.conf @@ -29,7 +29,7 @@ http { log_not_found off; deny all; } - + location ~ ~$ { # deny access to temp editor files, e.g. "script.php~" access_log off; @@ -65,6 +65,11 @@ http { include fastcgi.conf; } + location ~ /doc/ { + default_type "text/html"; + try_files $uri $uri/ $uri.html =404; + } + location ~ \.php$ { # deny access to all other PHP scripts deny all; diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md index 8cb39934..4e74d80b 100644 --- a/doc/md/Server-configuration.md +++ b/doc/md/Server-configuration.md @@ -325,6 +325,11 @@ server { deny all; } + location ~ /doc/ { + default_type "text/html"; + try_files $uri $uri/ $uri.html =404; + } + location = /favicon.ico { # serve the Shaarli favicon from its custom location alias /var/www/shaarli/images/favicon.ico;