pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.84k stars 1.75k forks source link

Incorrect URL on all /admin endpoints using reverse proxy with local DNS #5241

Closed TheSainEyereg closed 3 weeks ago

TheSainEyereg commented 3 weeks ago

Current Behavior

When the external domain and pterodactyl itself are kept on different machines, all links in https://ptero.mydomain.tld/admin lead to the domain that the reverse proxy accesses within the local network. Other pages in the panel work fine image

The only workaround I found is specifying Host header in reverse proxy image

Expected Behavior

In exactly the same configuration, all links on all sections of the panel have the domain ptero.mydomain.tld

Steps to Reproduce

Background: By some coincidence I have several devices at home that work as servers and about a year ago I decided to distribute different tasks between them. For example, an Orange Pi with a fast SSD in it holds all the databases, an old weak Raspberry Pi is responsible for network-related stuff (reverse proxy, local DNS, VPN to home), and another Raspberry Pi is for self-hosted resources like Hoppscotch. Well, now you see what a mess is going on here... I recently bought an x86 server for everything that doesn't run on ARM and decided to put Wigs on it while hosting panel itself on a second Raspberry Pi and that's where I ran into trouble.

Untitled

So...

  1. Install pterodactyl and nginx that exposes website to the internet to different machines
  2. Set up external domain with reverse proxy that points to another server in your network
  3. Visit /admin and try to navigate using sidebar

Panel Version

1.11.9

Wings Version

1.11.13

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

No response

Is there an existing issue for this?

QuintenQVD0 commented 3 weeks ago

Set the panel app_url to the right value in the .env

TheSainEyereg commented 3 weeks ago

Set the panel app_url to the right value in the .env

Already done, that's not the case

TheSainEyereg commented 3 weeks ago

I made it hard for myself. The only thing I needed to do was to add proxy_set_header Host $host; (which is recommended in all reverse proxy configuration guides). After that everything worked so it was configuration issue and #4984 did help

And btw I also forgot to specify settings for WebSocket to work with reverse proxy