From 80cfd7180a86ec514f302c5f1fec5c1cc1eb5e19 Mon Sep 17 00:00:00 2001 From: Eliot Berriot <contact@eliotberriot.com> Date: Mon, 26 Jun 2017 19:18:31 +0200 Subject: [PATCH] Fixed #20: added admin serving under /api/, minor tweaks to production nginx and env file --- api/config/settings/common.py | 2 +- deploy/env.prod.sample | 2 +- deploy/nginx.conf | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/config/settings/common.py b/api/config/settings/common.py index 5c55dfdc1..93381c4f5 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -199,7 +199,7 @@ CRISPY_TEMPLATE_PACK = 'bootstrap3' STATIC_ROOT = str(ROOT_DIR('staticfiles')) # See: https://docs.djangoproject.com/en/dev/ref/settings/#static-url -STATIC_URL = env("STATIC_URL", default='/static/') +STATIC_URL = env("STATIC_URL", default='/staticfiles/') # See: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#std:setting-STATICFILES_DIRS STATICFILES_DIRS = ( diff --git a/deploy/env.prod.sample b/deploy/env.prod.sample index 38d355cb1..fd3b4327f 100644 --- a/deploy/env.prod.sample +++ b/deploy/env.prod.sample @@ -30,7 +30,7 @@ DJANGO_SETTINGS_MODULE=config.settings.production DJANGO_SECRET_KEY= # You don't have to edit this -DJANGO_ADMIN_URL=^admin/ +DJANGO_ADMIN_URL=^api/admin/ # Update it to match the domain that will be used to reach your funkwhale # instance diff --git a/deploy/nginx.conf b/deploy/nginx.conf index 32fe193f5..d87413543 100644 --- a/deploy/nginx.conf +++ b/deploy/nginx.conf @@ -20,7 +20,7 @@ server { proxy_set_header Host $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 https; + proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect off; proxy_pass http://funkwhale-api/api/; } @@ -28,6 +28,6 @@ server { alias /srv/funkwhale/data/media/; } location /staticfiles/ { - alias /srv/funkwhale/data/staticfiles/; + alias /srv/funkwhale/data/static/; } } -- GitLab