From 6e506ce63254d3cc36c5628a20b0f36e9c736c48 Mon Sep 17 00:00:00 2001 From: Johannes H Date: Mon, 9 Sep 2019 11:15:36 +0200 Subject: [PATCH] Improvement of Apache config consistency and ease of configuration --- deploy/apache.conf | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/deploy/apache.conf b/deploy/apache.conf index 3b34dcdba..996e5488c 100644 --- a/deploy/apache.conf +++ b/deploy/apache.conf @@ -5,7 +5,9 @@ Define funkwhale-sn funkwhale.yourdomain.com # use different configuration than what is described in our installation guide. Define funkwhale-api http://localhost:5000 Define funkwhale-api-ws ws://localhost:5000 -Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music +Define FUNKWHALE_ROOT_PATH /srv/funkwhale +Define MUSIC_DIRECTORY_PATH ${FUNKWHALE_ROOT_PATH}/data/music +Define MEDIA_DIRECTORY_PATH ${FUNKWHALE_ROOT_PATH}/data/media # HTTP requests redirected to HTTPS @@ -90,17 +92,17 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music ProxyPass "!" - Alias /front /srv/funkwhale/front/dist + Alias /front ${FUNKWHALE_ROOT_PATH}/front/dist ProxyPass "!" - Alias /media /srv/funkwhale/data/media + Alias /media ${MEDIA_DIRECTORY_PATH} ProxyPass "!" - Alias /staticfiles /srv/funkwhale/data/static + Alias /staticfiles ${FUNKWHALE_ROOT_PATH}/data/static # Activating WebSockets @@ -108,19 +110,19 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music # Setting appropriate access levels to serve frontend - + Options FollowSymLinks AllowOverride None Require all granted - + Options FollowSymLinks AllowOverride None Require all granted - + Options FollowSymLinks AllowOverride None Require all granted @@ -133,7 +135,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music #LoadModule xsendfile_module modules/mod_xsendfile.so XSendFile On - XSendFilePath /srv/funkwhale/data/media + XSendFilePath ${MEDIA_DIRECTORY_PATH} XSendFilePath ${MUSIC_DIRECTORY_PATH} SetEnv MOD_X_SENDFILE_ENABLED 1