diff --git a/changes/changelog.d/2256.bugfix b/changes/changelog.d/2256.bugfix new file mode 100644 index 000000000..9d9d2c5ea --- /dev/null +++ b/changes/changelog.d/2256.bugfix @@ -0,0 +1 @@ +Fix regression that prevent static files from being served in non-docker-deployments (#2256) diff --git a/deploy/nginx.template b/deploy/nginx.template index c77cb9335..d306f8af4 100644 --- a/deploy/nginx.template +++ b/deploy/nginx.template @@ -192,4 +192,7 @@ server { return 302 ${FUNKWHALE_PROTOCOL}://${FUNKWHALE_HOSTNAME}/api/v1/instance/spa-manifest.json; } + location /staticfiles/ { + alias ${STATIC_ROOT}/; + } } diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index ab8ea05d9..6dca6c1f4 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -261,5 +261,10 @@ server { alias /usr/share/nginx/html/staticfiles/; } {% endif %} +{% if not config.reverse_proxy and not config.inside_docker %} + location /staticfiles/ { + alias ${STATIC_ROOT}/; + } +{% endif %} {% endif %} }