]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Fix: nginx - add rule to disable url-rewriting for the docs 1605/head
authorArthurHoaro <arthur@hoa.ro>
Wed, 21 Oct 2020 13:23:30 +0000 (15:23 +0200)
committerArthurHoaro <arthur@hoa.ro>
Wed, 21 Oct 2020 13:23:30 +0000 (15:23 +0200)
Related to #1603

.docker/nginx.conf
doc/md/Server-configuration.md

index 07fba33fec11bcbf90741c086586550a0b86c57c..023f52c1d1be5f8502c0aad2567a054b7216eb05 100644 (file)
@@ -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;
index 8cb39934603c35aaa4b4b8ebb42fb6305052fab1..4e74d80bb28d92f4899eda3fda1610967e2bd1a5 100644 (file)
@@ -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;