1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00

Workarounds for Jessie target:

- nginx in Jessie doesn't manage well variables in alias
- systemd helpers not up-to-date in Jessie stable version
This commit is contained in:
Jimmy Monin 2018-04-21 15:31:49 +02:00
parent ab317e2a37
commit b7161f3c16

View file

@ -22,7 +22,7 @@
} }
location __PATH__ { location __PATH__ {
alias $public; alias __FINALPATH__/public/;
add_header ETag ""; add_header ETag "";
if ($scheme = http) { if ($scheme = http) {
@ -96,7 +96,7 @@
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Sendfile-Type X-Accel-Redirect; 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; expires 1y;
add_header Cache-Control public,immutable; 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-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https; proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Sendfile-Type X-Accel-Redirect; 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; proxy_pass http://unix:__FINALPATH__/tmp/sockets/puma.sock;
break; break;
} }
@ -196,7 +196,7 @@
location __PATH__/downloads/ { location __PATH__/downloads/ {
internal; internal;
alias $public/; alias __FINALPATH__/public/;
} }
location @__NAME__ { location @__NAME__ {