When I go to 192.168.0.73:8123, everything works, but when I go to https://domain.xyz it shows only 502 Bad Gateway nginx (but I can see that the domain is working under let’s encrypt certificate).
Can you help me with that please? I have no problem to pay someone to try to help me with this, because I am really lost.
Will this even work if the port 80 and 443 is used by other websites that runs directly on the host machine (192.168.0.110)?
Looks like it should work.
Did you edit your Home Assistant config though to allow for the proxy? By default Home Assistant will refuse the connection until you edit the configuration.
Can you press the </> button to format that correctly so we can see it’s indented properly.
You don’t need that 255.255.255.0/24 line. Just the IP address of the Nginx Proxy
server {
if ($host = domain.xyz) {
return 301 https://$host$request_uri;
}
listen 80;
server_name domain.xyz;
return 301 https://$host$request_uri;
}
And just stick with 443 only. Apart from anything else, I don’t understand why there are 2 sections that redirect to https? One in an if statement, and one outside it. At the very least surely only one redirect is needed?
I’m not an expert in nginx config files (I just use Nginx Proxy manager) - but to me that seems like because the host will always match domain.xyz, it will be infinitely redirected?
OK and you have restarted Home Assistant obviously after editing the config.
Next step is to go the Home Assistant logs and then see what shows up in the logs when you try and access it via the https domain
Hmm 113 is couldn’t connect to the upstream host.
With that config - and with Home Assistant restarted to ensure that the new configuration has been loaded, then it should be accepting the connection now.