I have several domains pointing to my home server. I set up and nginx+letsencrypt docker container using the linuxserver/letsencrypt image.
this container is running on the same host as my hassio containers
I get to the login screen and am able to verify username and password. Providing an incorrect password gives an error message and reprompt. I can reach homeassistant though 10.0.0.10:8123 without any trouble. In other words… something is working!
however, when homeassistant would normally redirect to lovelace, I get the error 'unable to connect to homeassistant. I believe I am missing something in my config, but I am too inexperienced to determine what.
this is the http part of configuration.yaml
http:
use_x_forwarded_for: true
trusted_proxies:
- 10.0.0.0/24 # local network
- 172.0.0.0/8 # docker containers
and this is the homeassistant file in /config/nginx/site-confs/
upstream hass {
server 10.0.0.10:8123; # the hass server and port inside the network
}
server {
listen 443 ssl http2 ipv6only=off;
server_name eample.nl;
include /config/nginx/ssl.conf;
client_max_body_size 0;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
ssl_session_cache shared:SSL:10m;
proxy_buffering off;
location / {
proxy_pass http://hass; # Matches to the "upstream" name above
proxy_set_header Host $host;
proxy_redirect http:// https://;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # for forcing password validation from outside
proxy_set_header Upgrade $http_upgrade;
# proxy_set_header Connection $connection_upgrade; # this prevents the nginx: [emerg] unknown "connection_upgrade" variable error
}
}