Fixed broken nginx conf for federation

environments/review-docs-funkw-78jnxn/deployments/34
Eliot Berriot 2018-09-25 23:34:26 +02:00
rodzic a0553ccf7d
commit 6aab6369c0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
2 zmienionych plików z 14 dodań i 1 usunięć

Wyświetl plik

@ -9,7 +9,7 @@ if [ -n "$COMPOSE_PROJECT_NAME" ]; then
fi
echo "Copying template file..."
cp /etc/nginx/funkwhale_proxy.conf{.template,}
sed -i "s/X-Forwarded-Host \$host:\$server_port/X-Forwarded-Host ${FUNKWHALE_HOSTNAME}:${FORWARDED_PORT}/" /etc/nginx/funkwhale_proxy.conf
sed -i "s/X-Forwarded-Host \$host:\$server_port/X-Forwarded-Host ${FUNKWHALE_HOSTNAME}/" /etc/nginx/funkwhale_proxy.conf
sed -i "s/proxy_set_header Host \$host/proxy_set_header Host ${FUNKWHALE_HOSTNAME}/" /etc/nginx/funkwhale_proxy.conf
sed -i "s/proxy_set_header X-Forwarded-Port \$server_port/proxy_set_header X-Forwarded-Port ${FORWARDED_PORT}/" /etc/nginx/funkwhale_proxy.conf
sed -i "s/proxy_set_header X-Forwarded-Proto \$scheme/proxy_set_header X-Forwarded-Proto ${FORWARDED_PROTO}/" /etc/nginx/funkwhale_proxy.conf

Wyświetl plik

@ -180,6 +180,7 @@ Libraries created this way will have a different visibility level depending of y
This script will contain other database-related operations, but the impact will remain
invisible.
Upgrade instructions
--------------------
@ -195,3 +196,15 @@ On non docker-setups::
python api/manage.py script migrate_to_user_libraries --no-input
If the scripts ends without errors, you're instance should be updated and ready to use :)
.. note::
If you use nginx, ensure your funkwhale_proxy.conf file does not contain this:
proxy_set_header X-Forwarded-Host $host:$server_port;
If you have this line present, replace it with:
proxy_set_header X-Forwarded-Host $host;
And reload your nginx server.