From b7161f3c1691bbd9cd13074f0966342311ef9bbf Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sat, 21 Apr 2018 15:31:49 +0200 Subject: [PATCH] Workarounds for Jessie target: - nginx in Jessie doesn't manage well variables in alias - systemd helpers not up-to-date in Jessie stable version --- conf/nginx.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2c5780a..d7dbd12 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -22,7 +22,7 @@ } location __PATH__ { - alias $public; + alias __FINALPATH__/public/; add_header ETag ""; if ($scheme = http) { @@ -96,7 +96,7 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Sendfile-Type X-Accel-Redirect; - proxy_set_header X-Accel-Mapping $public/=/downloads/; + proxy_set_header X-Accel-Mapping __FINALPATH__/public/=/downloads/; expires 1y; add_header Cache-Control public,immutable; @@ -128,7 +128,7 @@ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Sendfile-Type X-Accel-Redirect; - proxy_set_header X-Accel-Mapping $public/=/downloads/; + proxy_set_header X-Accel-Mapping __FINALPATH__/public/=/downloads/; proxy_pass http://unix:__FINALPATH__/tmp/sockets/puma.sock; break; } @@ -196,7 +196,7 @@ location __PATH__/downloads/ { internal; - alias $public/; + alias __FINALPATH__/public/; } location @__NAME__ {