Can't get into the frontend after moving Docker container to a new host

Thanks. The extra logging didn’t help much, sadly. But I did find out some more. I actually got into the UI after a whole collection of setting tweaks and after finally turning off this bit of configuration to make the reverse proxy work:

http:
  server_host: 127.0.0.1
  use_x_forwarded_for: true
  trusted_proxies: 127.0.0.1

If I comment those lines or at least remove/comment the server_host line I can get into Lovelace by going to port 8123 on the local IP or hostname of the NAS. My domain won’t work at that point, which sucks. This is the nginx config that Synology’s reverse proxy feature came up with, and it looks fine to me.

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name sub.domain.tld;

    ssl_certificate /usr/syno/etc/certificate/ReverseProxy/d19ccfee-bf82-422b-987c-99aee1889f39/fullchain.pem;
    ssl_certificate_key /usr/syno/etc/certificate/ReverseProxy/d19ccfee-bf82-422b-987c-99aee1889f39/privkey.pem;
    add_header Strict-Transport-Security "max-age=15768000; includeSubdomains; preload" always;

    location / {
        proxy_connect_timeout 60;
        proxy_read_timeout 60;
        proxy_send_timeout 60;
        proxy_intercept_errors off;
        proxy_http_version 1.1;

        proxy_set_header        Host            $http_host;
        proxy_set_header        X-Real-IP            $remote_addr;
        proxy_set_header        X-Forwarded-For            $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto            $scheme;
        proxy_pass http://localhost:8123;
    }

    error_page 403 404 500 502 503 504 @error_page;

    location @error_page {
        root /usr/syno/share/nginx;
        rewrite (.*) /error.html break;
        allow all;
    }

}

If I try to log in through the reserve proxy I get a notification in the tab that is working, saying:

Login attempt or request with invalid authentication from {my external IP here}

…which is weird because they’re the same credentials that I can log in with just fine in the tab that uses the local hostname and port 8123.

Does this make sense to anyone?