From d6ad60126d249db4f6844cb4e681cc71c58eeca3 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 9 Oct 2020 17:06:17 +0200 Subject: [PATCH] Fix a couple of issues in the nginx template For instance, `X-Forwarded-Proto` is needed to properly generate the callback URL for 3rd-party auth through Ueberauth Signed-off-by: Thomas Citharel --- support/nginx/mobilizon.conf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/support/nginx/mobilizon.conf b/support/nginx/mobilizon.conf index aff05d8ed..544170607 100644 --- a/support/nginx/mobilizon.conf +++ b/support/nginx/mobilizon.conf @@ -62,10 +62,11 @@ server { proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; location / { - try_files $uri @proxy; + proxy_pass http://localhost:4000; } # Let's Encrypt keeps its files here @@ -74,10 +75,6 @@ server { default_type "text/plain"; } - location / { - proxy_pass http://localhost:4000; - } - location ~ ^/(js|css) { root /home/mobilizon/live/priv/static; etag off; @@ -94,7 +91,7 @@ server { error_page 500 501 502 503 504 @error; location @error { - root /home/tcit/dev/frama/mobilizon/priv/errors; + root /home/mobilizon/live/priv/errors; try_files /error.html 502; }