diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-21 15:55:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-21 15:55:39 +0200 |
commit | 8f6e3d51ccb2df513aadeabafbc5bfffe38b8608 (patch) | |
tree | 3ffaf9cc030389c1683fdd2f386c0ecbd1981f6f | |
parent | 344544334961370388a2ea2eb72bb9827703d725 (diff) | |
parent | 2f87bfdc69052cd64e84b1d2b97a0af14991a385 (diff) | |
download | Shaarli-8f6e3d51ccb2df513aadeabafbc5bfffe38b8608.tar.gz Shaarli-8f6e3d51ccb2df513aadeabafbc5bfffe38b8608.tar.zst Shaarli-8f6e3d51ccb2df513aadeabafbc5bfffe38b8608.zip |
Merge pull request #1605 from ArthurHoaro/fix/nginx-doc-rule
Fix: nginx - add rule to disable url-rewriting for the docs
-rw-r--r-- | .docker/nginx.conf | 7 | ||||
-rw-r--r-- | doc/md/Server-configuration.md | 5 |
2 files changed, 11 insertions, 1 deletions
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 { | |||
29 | log_not_found off; | 29 | log_not_found off; |
30 | deny all; | 30 | deny all; |
31 | } | 31 | } |
32 | 32 | ||
33 | location ~ ~$ { | 33 | location ~ ~$ { |
34 | # deny access to temp editor files, e.g. "script.php~" | 34 | # deny access to temp editor files, e.g. "script.php~" |
35 | access_log off; | 35 | access_log off; |
@@ -65,6 +65,11 @@ http { | |||
65 | include fastcgi.conf; | 65 | include fastcgi.conf; |
66 | } | 66 | } |
67 | 67 | ||
68 | location ~ /doc/ { | ||
69 | default_type "text/html"; | ||
70 | try_files $uri $uri/ $uri.html =404; | ||
71 | } | ||
72 | |||
68 | location ~ \.php$ { | 73 | location ~ \.php$ { |
69 | # deny access to all other PHP scripts | 74 | # deny access to all other PHP scripts |
70 | deny all; | 75 | 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 { | |||
325 | deny all; | 325 | deny all; |
326 | } | 326 | } |
327 | 327 | ||
328 | location ~ /doc/ { | ||
329 | default_type "text/html"; | ||
330 | try_files $uri $uri/ $uri.html =404; | ||
331 | } | ||
332 | |||
328 | location = /favicon.ico { | 333 | location = /favicon.ico { |
329 | # serve the Shaarli favicon from its custom location | 334 | # serve the Shaarli favicon from its custom location |
330 | alias /var/www/shaarli/images/favicon.ico; | 335 | alias /var/www/shaarli/images/favicon.ico; |