From 76362b020e9e92c8332dcc0f7acd74b36faf6370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Sun, 26 Nov 2023 19:33:13 +0100 Subject: [PATCH] fix(nginx): fix websocket issue in template Part-of: --- changes/changelog.d/websocket.bugfix | 1 + deploy/docker.proxy.template | 1 + deploy/nginx.template | 1 + docker/nginx/conf.dev | 1 + front/docker/funkwhale.conf.template | 1 + templates/nginx.conf.j2 | 3 ++- 6 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/websocket.bugfix diff --git a/changes/changelog.d/websocket.bugfix b/changes/changelog.d/websocket.bugfix new file mode 100644 index 000000000..ebafa81a0 --- /dev/null +++ b/changes/changelog.d/websocket.bugfix @@ -0,0 +1 @@ +Fixed an issue with the nginx templates that caused issues when connecting to websockets. diff --git a/deploy/docker.proxy.template b/deploy/docker.proxy.template index 4e232786c..06908cbcc 100644 --- a/deploy/docker.proxy.template +++ b/deploy/docker.proxy.template @@ -81,6 +81,7 @@ server { location / { expires 1d; + include /etc/nginx/funkwhale_proxy.conf; proxy_pass http://fw; } diff --git a/deploy/nginx.template b/deploy/nginx.template index 61cf88ceb..0a5b3ca93 100644 --- a/deploy/nginx.template +++ b/deploy/nginx.template @@ -95,6 +95,7 @@ server { location / { expires 1d; + include /etc/nginx/funkwhale_proxy.conf; alias ${FUNKWHALE_FRONTEND_PATH}/; try_files $uri $uri/ /index.html; } diff --git a/docker/nginx/conf.dev b/docker/nginx/conf.dev index 931d47d35..67a27dd8a 100644 --- a/docker/nginx/conf.dev +++ b/docker/nginx/conf.dev @@ -67,6 +67,7 @@ server { location / { expires 1d; + include /etc/nginx/funkwhale_proxy.conf; proxy_pass http://funkwhale-front; } diff --git a/front/docker/funkwhale.conf.template b/front/docker/funkwhale.conf.template index 144cd3ae5..3420a3388 100644 --- a/front/docker/funkwhale.conf.template +++ b/front/docker/funkwhale.conf.template @@ -63,6 +63,7 @@ server { location / { expires 1d; + include /etc/nginx/funkwhale_proxy.conf; alias /usr/share/nginx/html/; try_files $uri $uri/ /index.html; } diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 4822eae31..936e738fc 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -75,7 +75,7 @@ server { listen [::]:80; server_name _; -PI_IP}:${FUNKWHALE_API_PORT}; + {% endif %} # General configs @@ -134,6 +134,7 @@ PI_IP}:${FUNKWHALE_API_PORT}; location / { expires 1d; + include /etc/nginx/funkwhale_proxy.conf; {% if config.proxy_frontend and not config.reverse_proxy %} proxy_pass http://funkwhale-front; {% elif not config.proxy_frontend and config.reverse_proxy %}