Closed sebbacon closed 6 years ago
Progress:
Configured certificate over DNS:
certbot certonly --manual --preferred-challenges dns
Set up two nginx servers on ports 443 and 444 for openhab and grafana respectively, forwarded ports 81 and 92 to these. Turned off auth within openhab and grafana and replaced with basic auth in nginx.
Had to override basic auth header when proxying to grafana:
https://github.com/grafana/grafana/issues/8314#issuecomment-320197195
There's a small issue that going to the root https://openhab.baconconsulting.co.uk:81/ redirects to http://openhab.baconconsulting.co.uk/start/index. I can't connect via the mobile app so I wonder if that's related.
Tracing the app, it calls:
GET /rest/bindings
Fixed this by having the router forward to the same ports that nginx was listening on (i.e. 81-82).
So we can: