summarylogtreecommitdiffstats
path: root/apache-funkwhale.conf
diff options
context:
space:
mode:
Diffstat (limited to 'apache-funkwhale.conf')
-rw-r--r--apache-funkwhale.conf45
1 files changed, 27 insertions, 18 deletions
diff --git a/apache-funkwhale.conf b/apache-funkwhale.conf
index a0af46d970f2..9c98ffd063ec 100644
--- a/apache-funkwhale.conf
+++ b/apache-funkwhale.conf
@@ -6,7 +6,8 @@ Define funkwhale-sn funkwhale.local
Define funkwhale-api http://localhost:5000
Define funkwhale-api-ws ws://localhost:5000
Define FUNKWHALE_FRONTEND_PATH /usr/share/webapps/funkwhale/front/dist
-Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
+Define FUNKWHALE_DATA_PATH /srv/funkwhale/data
+Define MUSIC_DIRECTORY_PATH ${FUNKWHALE_DATA_PATH}/music
<IfModule mod_alias.c>
Alias /funkwhale ${FUNKWHALE_FRONTEND_PATH}
@@ -35,8 +36,8 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
ServerName ${funkwhale-sn}
# Path to ErrorLog and access log
- ErrorLog /var/log/httpd/funkwhale/error.log
- CustomLog /var/log/httpd/funkwhale/access.log combined
+ ErrorLog ${APACHE_LOG_DIR}/funkwhale/error.log
+ CustomLog ${APACHE_LOG_DIR}/funkwhale/access.log combined
# TLS
# Feel free to use your own configuration for SSL here or simply remove the
@@ -55,10 +56,6 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
# Tell the api that the client is using https
RequestHeader set X-Forwarded-Proto "https"
- DocumentRoot ${FUNKWHALE_FRONTEND_PATH}
-
- FallbackResource /index.html
-
# Configure Proxy settings
# ProxyPreserveHost pass the original Host header to the backend server
ProxyVia On
@@ -77,15 +74,12 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
Allow from all
</Proxy>
- # Activating WebSockets
- ProxyPass "/api/v1/activity" ${funkwhale-api-ws}/api/v1/activity
-
- <Location "/api">
+ <Location "/">
# similar to nginx 'client_max_body_size 100M;'
LimitRequestBody 104857600
- ProxyPass ${funkwhale-api}/api
- ProxyPassReverse ${funkwhale-api}/api
+ ProxyPass ${funkwhale-api}/
+ ProxyPassReverse ${funkwhale-api}/
</Location>
<Location "/federation">
ProxyPass ${funkwhale-api}/federation
@@ -103,13 +97,28 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
ProxyPassReverse ${funkwhale-api}/.well-known/
</Location>
- Alias /media /srv/funkwhale/data/media
+ <Location "/front">
+ ProxyPass "!"
+ </Location>
Alias /front ${FUNKWHALE_FRONTEND_PATH}
- Alias /staticfiles /srv/funkwhale/data/static
+ <Location "/media">
+ ProxyPass "!"
+ </Location>
+ Alias /media ${FUNKWHALE_DATA_PATH}/media
+
+ <Location "/staticfiles">
+ ProxyPass "!"
+ </Location>
+ Alias /staticfiles ${FUNKWHALE_DATA_PATH}/static
+
+ # Activating WebSockets
+ <Location "/api/v1/activity">
+ ProxyPass ${funkwhale-api-ws}/api/v1/activity
+ </Location>
# Setting appropriate access levels to serve frontend
- <Directory "/srv/funkwhale/data/static">
+ <Directory ${FUNKWHALE_DATA_PATH}/static>
Options FollowSymLinks
AllowOverride None
Require all granted
@@ -121,7 +130,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
Require all granted
</Directory>
- <Directory /srv/funkwhale/data/media>
+ <Directory ${FUNKWHALE_DATA_PATH}/media>
Options FollowSymLinks
AllowOverride None
Require all granted
@@ -134,7 +143,7 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
LoadModule xsendfile_module modules/mod_xsendfile.so
<IfModule mod_xsendfile.c>
XSendFile On
- XSendFilePath /srv/funkwhale/data/media
+ XSendFilePath ${FUNKWHALE_DATA_PATH}/media
XSendFilePath ${MUSIC_DIRECTORY_PATH}
SetEnv MOD_X_SENDFILE_ENABLED 1
</IfModule>