Skip to content
Snippets Groups Projects
Commit 0905a87b authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch 'develop' into 'develop'

Improvement of Apache config consistency and ease of configuration

See merge request funkwhale/funkwhale!874
parents 02265339 6e506ce6
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,9 @@ Define funkwhale-sn funkwhale.yourdomain.com ...@@ -5,7 +5,9 @@ Define funkwhale-sn funkwhale.yourdomain.com
# use different configuration than what is described in our installation guide. # use different configuration than what is described in our installation guide.
Define funkwhale-api http://localhost:5000 Define funkwhale-api http://localhost:5000
Define funkwhale-api-ws ws://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 # HTTP requests redirected to HTTPS
<VirtualHost *:80> <VirtualHost *:80>
...@@ -90,17 +92,17 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music ...@@ -90,17 +92,17 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
<Location "/front"> <Location "/front">
ProxyPass "!" ProxyPass "!"
</Location> </Location>
Alias /front /srv/funkwhale/front/dist Alias /front ${FUNKWHALE_ROOT_PATH}/front/dist
<Location "/media"> <Location "/media">
ProxyPass "!" ProxyPass "!"
</Location> </Location>
Alias /media /srv/funkwhale/data/media Alias /media ${MEDIA_DIRECTORY_PATH}
<Location "/staticfiles"> <Location "/staticfiles">
ProxyPass "!" ProxyPass "!"
</Location> </Location>
Alias /staticfiles /srv/funkwhale/data/static Alias /staticfiles ${FUNKWHALE_ROOT_PATH}/data/static
# Activating WebSockets # Activating WebSockets
<Location "/api/v1/activity"> <Location "/api/v1/activity">
...@@ -108,19 +110,19 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music ...@@ -108,19 +110,19 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
</Location> </Location>
# Setting appropriate access levels to serve frontend # Setting appropriate access levels to serve frontend
<Directory "/srv/funkwhale/data/static"> <Directory "${FUNKWHALE_ROOT_PATH}/data/static">
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
Require all granted Require all granted
</Directory> </Directory>
<Directory /srv/funkwhale/front/dist> <Directory "${FUNKWHALE_ROOT_PATH}/front/dist">
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
Require all granted Require all granted
</Directory> </Directory>
<Directory /srv/funkwhale/data/media> <Directory "${MEDIA_DIRECTORY_PATH}">
Options FollowSymLinks Options FollowSymLinks
AllowOverride None AllowOverride None
Require all granted Require all granted
...@@ -133,7 +135,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music ...@@ -133,7 +135,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
#LoadModule xsendfile_module modules/mod_xsendfile.so #LoadModule xsendfile_module modules/mod_xsendfile.so
<IfModule mod_xsendfile.c> <IfModule mod_xsendfile.c>
XSendFile On XSendFile On
XSendFilePath /srv/funkwhale/data/media XSendFilePath ${MEDIA_DIRECTORY_PATH}
XSendFilePath ${MUSIC_DIRECTORY_PATH} XSendFilePath ${MUSIC_DIRECTORY_PATH}
SetEnv MOD_X_SENDFILE_ENABLED 1 SetEnv MOD_X_SENDFILE_ENABLED 1
</IfModule> </IfModule>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment