inovector / mixpost

Mixpost - Self-hosted social media management software (Buffer alternative)
https://mixpost.app
MIT License
1.2k stars 184 forks source link

App URL not working with reverse Proxy #97

Closed MarlonResler closed 4 months ago

MarlonResler commented 6 months ago

Steps to reproduce the problem

  1. Setup Mixpost as stated in docs (no ssl support)
  2. Configure a reverse proxy with domain and ssl support

Expected behaviour

App using a url with domain

Actual behaviour

Requests are redirect to a url with local ip

Detailed description

Setup: Server with mix post docker container has ip 10.0.0.1 Proxy has a nginx with domain mixpost.example.com and proxy_pass to 10.0.0.1:9000

Mixpost is accessible over proxy, but every request, like login, gets redirected to 10.0.0.1:9000, the internal url between mix post and reverse proxy.

So Environment Variable App_URL is useless.

Specifications

Mixpost Docker 1.6.0 Local Server with Debian 12 Proxy Server with Debian 12 and nginx(latest of today)

lao9s commented 6 months ago

Hi,

Are you sure that APP_URL is equal to your domain?

MarlonResler commented 6 months ago

Hello,

yes im sure. The http / https has impact on the redirect, but not the domain.

A workaround for nginx as proxy is to set the host header location / { proxy_pass http://main; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $remote_addr; }

but for my understanding of APP_URL, this shouldn't be necessary.