[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: nginx: berlin: Attempt to fix *.pdf locations.

From: Ludovic Courtès
Subject: 02/02: nginx: berlin: Attempt to fix *.pdf locations.
Date: Wed, 17 Jul 2019 18:37:10 -0400 (EDT)

civodul pushed a commit to branch master
in repository maintenance.

commit 06b6e8bc718e4cb544da07946736bc6f71ac23f6
Author: Ludovic Courtès <address@hidden>
Date:   Thu Jul 18 00:35:12 2019 +0200

    nginx: berlin: Attempt to fix *.pdf locations.
    * hydra/nginx/berlin.scm ( Adjust regexp
    for *.pdf.  Add two locations for /manual/*.pdf and /manual/devel/*.pdf
    so they take precedence over it.
 hydra/nginx/berlin.scm | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/hydra/nginx/berlin.scm b/hydra/nginx/berlin.scm
index 92f62a9..01bc806 100644
--- a/hydra/nginx/berlin.scm
+++ b/hydra/nginx/berlin.scm
@@ -437,9 +437,20 @@ PUBLISH-URL."
     (uri "/manual")
     (body (list "alias /srv/guix-manual;")))
+   ;; We want a regexp to match *.pdf at the top level, but we also want
+   ;; /manual/*.pdf to go to a difference place; the latter needs to take
+   ;; precedence over the former, hence these location blocks.
+   (nginx-location-configuration
+    (uri "~ /manual/devel/(.*\\.pdf)$")
+    (body (list "alias /srv/guix-manual-devel/$1;")))
-    (uri "~ ^[^/]+\\.pdf$")                       ;*.pdf at the top level
+    (uri "~ /manual/(.*\\.pdf)$")
+    (body (list "alias /srv/guix-manual/$1;")))
+   (nginx-location-configuration
+    (uri "~ \\.pdf$")                             ;*.pdf at the top level
     (body (list "root /srv/guix-pdfs;")))
    (nginx-location-configuration                  ;certbot
     (uri "/.well-known")
     (body (list "root /var/www;")))))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]