From 8cae6d30c04b5bcb7bd9df5a78368e2d9b9788db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakobus=20Sch=C3=BCrz?= Date: Wed, 19 Jan 2022 21:47:34 +0100 Subject: [PATCH] add static location for img fixes not shown mobilizon image on "sorry-page" when service not running. --- support/nginx/mobilizon-release.conf | 7 +++++++ support/nginx/mobilizon-source.conf | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/support/nginx/mobilizon-release.conf b/support/nginx/mobilizon-release.conf index d6303e0be..f074c3544 100644 --- a/support/nginx/mobilizon-release.conf +++ b/support/nginx/mobilizon-release.conf @@ -75,6 +75,13 @@ server { default_type "text/plain"; } + location ~ ^/img { + root /opt/mobilizon/priv/static; + etag off; + access_log off; + add_header Cache-Control "public, max-age=31536000, immutable"; + } + location ~ ^/(js|css) { root /opt/mobilizon/priv/static; etag off; diff --git a/support/nginx/mobilizon-source.conf b/support/nginx/mobilizon-source.conf index ab6a81f1c..ff626e197 100644 --- a/support/nginx/mobilizon-source.conf +++ b/support/nginx/mobilizon-source.conf @@ -75,6 +75,13 @@ server { default_type "text/plain"; } + location ~ ^/img { + root /opt/mobilizon/priv/static; + etag off; + access_log off; + add_header Cache-Control "public, max-age=31536000, immutable"; + } + location ~ ^/(js|css) { root /home/mobilizon/live/priv/static; etag off;