Merge branch 'apache-documentation' into 'develop'

Updated documentation with apache2 reverse-proxy instructions

See merge request funkwhale/funkwhale!175
This commit is contained in:
Eliot Berriot 2018-04-28 14:28:52 +00:00
commit 263966f6f8
3 changed files with 57 additions and 23 deletions

View File

@ -0,0 +1 @@
Sample virtual-host file for Apache2 reverse-proxy (!165)

View File

@ -1,8 +1,12 @@
# Following variables should be modified according to your setup # Following variables MUST be modified according to your setup
Define funkwhale-api http://192.168.1.199:5000 Define funkwhale-sn funkwhale.yourdomain.com
Define funkwhale-api-ws ws://192.168.1.199:5000
Define funkwhale-sn funkwhale.duckdns.org # Following variables should be modified according to your setup and if you
Define MUSIC_DIRECTORY_PATH /music/directory/path # use different configuration than what is described in our installation guide.
Define funkwhale-api http://localhost:5000
Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
# websockets are not working yet
# Define funkwhale-api-ws ws://localhost:5000
# HTTP request redirected to HTTPS # HTTP request redirected to HTTPS
@ -63,15 +67,10 @@ Define MUSIC_DIRECTORY_PATH /music/directory/path
AddDefaultCharset off AddDefaultCharset off
Order Allow,Deny Order Allow,Deny
Allow from all Allow from all
# Here you can set a password using htpasswd to protect your proxy server
#Authtype Basic
#Authname "Password Required"
#AuthUserFile /etc/apache2/.htpasswd
#Require valid-user
</Proxy> </Proxy>
# Activating WebSockets (not working) # Activating WebSockets (not working)
ProxyPass "/api/v1/instance/activity" "ws://192.168.1.199:5000/api/v1/instance/activity" # ProxyPass "/api/v1/instance/activity" "ws://localhost:5000/api/v1/instance/activity"
<Location "/api"> <Location "/api">
# similar to nginx 'client_max_body_size 30M;' # similar to nginx 'client_max_body_size 30M;'

View File

@ -92,7 +92,7 @@ Files for the web frontend are purely static and can simply be downloaded, unzip
Reverse proxy Reverse proxy
-------------- --------------
In order to make funkwhale accessible from outside your server and to play nicely with other applications on your machine, you should configure a reverse proxy. At the moment, we only have documentation for nginx, if you know how to implement the same thing for apache, you're welcome. In order to make funkwhale accessible from outside your server and to play nicely with other applications on your machine, you should configure a reverse proxy.
Nginx Nginx
^^^^^ ^^^^^
@ -112,7 +112,41 @@ Then, download our sample virtualhost file and proxy conf:
curl -L -o /etc/nginx/sites-available/funkwhale.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/nginx.conf" curl -L -o /etc/nginx/sites-available/funkwhale.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/nginx.conf"
ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/ ln -s /etc/nginx/sites-available/funkwhale.conf /etc/nginx/sites-enabled/
Ensure static assets and proxy pass match your configuration, and check the configuration is valid with ``nginx -t``. If everything is fine, you can restart your nginx server with ``service nginx restart``. Ensure static assets and proxy pass match your configuration, and check the configuration is valid with ``nginx -t``.
If everything is fine, you can restart your nginx server with ``service nginx restart``.
Apache2
^^^^^^^
.. note::
Apache2 support is still very recent and the following features
are not working yet:
- Websocket (used for real-time updates on Instance timeline)
- Transcoding of audio files
Those features are not necessary to use your Funkwhale instance, and
transcoding in particular is still in alpha-state anyway.
Ensure you have a recent version of apache2 installed on your server.
You'll also need the following dependencies::
apt install libapache2-mod-xsendfile
Then, download our sample virtualhost file:
.. parsed-literal::
curl -L -o /etc/apache2/sites-available/funkwhale.conf "https://code.eliotberriot.com/funkwhale/funkwhale/raw/|version|/deploy/apache.conf"
ln -s /etc/apache2/sites-available/funkwhale.conf /etc/apache2/sites-enabled/
You can tweak the configuration file according to your setup, especially the
TLS configuration. Otherwise, defaults, should work if you followed the
installation guide.
Check the configuration is valid with ``apache2ctl configtest``, and once you're
done, load the new configuration with ``service apache2 restart``.
About internal locations About internal locations
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~