Nginx proxy server - strange behavior
Nginx proxy server - strange behavior
Hello fellow selfhosters! I changed my server OS from fedora server to alma linux as I wanted a more stable base with less frequent updates for my docker containers, so I backed everything up and installed almalinux. It all went smoothly, and now all the containers seem to work as before except for nginx proxy manager: on fedora, I set all the proxy hosts like this (using jellyfin for instance):
jellyfin.mydomain.duckdns.org
> http://myserverhostname:8096
now, for some strange reasons, it does not work anymore, and I get a bad gateway error. I tried with and without SSL (that I had from the previous installation, do I need to regenerate them? but without it should work anyway...), pointing to localhost:8096
, to myserverhostname:8096
, to jellyfin:8096
, but nothing. The only way I could make it work was with the resolved IP address of my server:
bash
# host myserverhostname myserverhostname.station has address 192.168.1.13
pointing nginx to 192.168.1.13:8096
correctly shows the website. why does this happens? am I doing something wrong?
EDIT: the only one that's working with localhost
is nginx itself (http://localhost:81
)
======
SOLUTION: instead of myserverhostname
, in nginx proxy host configuration (in the gui) I had to set myserverhostname.station
to get it working. I don't know why, in the previous installation only the hostname was enough...
As you can forward by ip but not by name it sounds like resolver issue.
how can I find out more about this?
On the host of the nginx rev proxy or in nginx config files. Something seems to block the lookup from name to ip, as ip works you know the proxy works. Check dns config and nginx config on that host