Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

X-Forwarded-Port header missing from nginx reverse proxy instructions #1916

Open
hadynwalbyoff opened this issue Jun 13, 2021 · 0 comments
Open

Comments

@hadynwalbyoff
Copy link

hadynwalbyoff commented Jun 13, 2021

Problem description

Documentation error/shortfall...

When configuring nginx as per https://airsonic.github.io/docs/proxy/nginx/#top with a port other that 443, it does not work and all the redirects go to the default https port (443).
To fix this you also need to add the header X-Forwarded-Port
as in
proxy_set_header X-Forwarded-Port $server_port;
must be added to the nginx configuration.

Steps to reproduce

  1. Set up nginx reverse proxy
  2. Set to list on port 8443 (or any other port)
  3. Got to https://:8443/airsonic
  4. The login page will redirect to https:///airsonic/login not https://:8443/airsonic/login
  5. As a result you wil not get a response

System information

  • Airsonic version: 10.6.2-RELEASE – May 3, 2020
  • Operating system: Debian Buster
  • Java version: Docker container airsonic/airsonic
  • Proxy server: nginx
  • Client: Chrome
  • Language: English

Additional notes

Adding
proxy_set_header X-Forwarded-Port $server_port;
to the nginx config fixes this

To see an example, I found it in google here:
https://vkuzel.com/configuration-of-a-nginx-reverse-proxy-in-front-of-a-spring-boot-2-1-application-protected-by-oauth-2-0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant