From cfd6231364ad817c27d6a1c872482fbfe6e0f172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20Thomas?= Date: Wed, 15 Apr 2020 18:57:39 +0200 Subject: [PATCH] Move common 'forward headers' proxy section in the prerequisites --- proxy/apache.md | 17 ----------------- proxy/caddy.md | 17 ----------------- proxy/haproxy.md | 17 ----------------- proxy/nginx.md | 17 ----------------- proxy/prerequisites.md | 19 +++++++++++++++++++ 5 files changed, 19 insertions(+), 68 deletions(-) diff --git a/proxy/apache.md b/proxy/apache.md index 7137cc7..2e01d3f 100644 --- a/proxy/apache.md +++ b/proxy/apache.md @@ -75,23 +75,6 @@ Restart the `apache2` service: sudo systemctl restart apache2.service ``` -#### Forward headers - -You will also need to make sure Airsonic uses the correct headers for redirects, by setting the `server.use-forward-headers` property to `true`. - -To do so, stop your Airsonic server or Docker image, then edit the `config/application.properties` file: - -``` -nano /path/to/airsonic/config/application.properties -``` - -Add the following line to the bottom of the file: -``` -server.use-forward-headers=true -``` - -Use Ctrl+X to save and exit the file, and restart your Airsonic server or Docker image. - #### Content Security Policy You may face some `Content-Security-Policy` issues. To fix this, add the following line to your Apache configuration: diff --git a/proxy/caddy.md b/proxy/caddy.md index 82c1baa..f35e03b 100644 --- a/proxy/caddy.md +++ b/proxy/caddy.md @@ -32,20 +32,3 @@ Check the Caddy config for validity, and then restart the Caddy service: caddy -conf /etc/caddy/caddy.conf -validate sudo systemctl restart caddy.service ``` - -#### Forward headers - -You will also need to make sure Airsonic uses the correct headers for redirects, by setting the `server.use-forward-headers` property to `true`. - -To do so, stop your Airsonic server or Docker image, then edit the `config/application.properties` file: - -``` -nano /path/to/airsonic/config/airsonic.properties -``` - -Add the following line to the bottom of the file: -``` -server.use-forward-headers=true -``` - -Use Ctrl+X to save and exit the file, and restart your Airsonic server or Docker image. diff --git a/proxy/haproxy.md b/proxy/haproxy.md index 0857655..46ea6c5 100644 --- a/proxy/haproxy.md +++ b/proxy/haproxy.md @@ -65,20 +65,3 @@ Restart the HAProxy service: ``` sudo systemctl restart haproxy.service ``` - -#### Forward headers - -You will also need to make sure Airsonic uses the correct headers for redirects, by setting the `server.use-forward-headers` property to `true`. - -To do so, stop your Airsonic server or Docker image, then edit the `config/application.properties` file: - -``` -nano /path/to/airsonic/config/application.properties -``` - -Add the following line to the bottom of the file: -``` -server.use-forward-headers=true -``` - -Use Ctrl+X to save and exit the file, and restart your Airsonic server or Docker image. diff --git a/proxy/nginx.md b/proxy/nginx.md index dd25a18..0248f08 100644 --- a/proxy/nginx.md +++ b/proxy/nginx.md @@ -84,23 +84,6 @@ Restart the Nginx service: sudo systemctl restart nginx.service ``` -#### Forward headers - -You will also need to make sure Airsonic uses the correct headers for redirects, by setting the `server.use-forward-headers` property to `true`. - -To do so, stop your Airsonic server or Docker image, then edit the `config/application.properties` file: - -``` -nano /path/to/airsonic/config/application.properties -``` - -Add the following line to the bottom of the file: -``` -server.use-forward-headers=true -``` - -Use Ctrl+X to save and exit the file, and restart your Airsonic server or Docker image. - #### Content Security Policy You may face some `Content-Security-Policy` issues. To fix this, add the following line to your Nginx configuration: diff --git a/proxy/prerequisites.md b/proxy/prerequisites.md index ac7e518..c97d672 100644 --- a/proxy/prerequisites.md +++ b/proxy/prerequisites.md @@ -15,6 +15,8 @@ This guide assumes you already have a TLS certificate. [Let's Encrypt](https://l ### Configure Airsonic +##### Basic configuration + A few settings should be tweaked via Spring Boot or Tomcat configuration: @@ -27,6 +29,23 @@ To change this, please use one of the guide below according to your installation - [Tomcat](/docs/configure/tomcat/) - [Standalone](/docs/configure/standalone/) +##### Forward headers + +You will also need to make sure Airsonic uses the correct headers for redirects, by setting the `server.use-forward-headers` property to `true`. + +To do so, stop your Airsonic server or Docker image, then edit the `config/application.properties` file: + +``` +nano /path/to/airsonic/config/application.properties +``` + +Add the following line to the bottom of the file: +``` +server.use-forward-headers=true +``` + +Use Ctrl+X to save and exit the file, and restart your Airsonic server or Docker image. + ### Reverse proxy configuration ##### How it works