I have set up OpenHAB with nginx as reverse proxy which also does HTTPS, I used the usual config:
server {
listen 8084 ssl;
server_name openhab.<mydomain>;
location / {
proxy_pass http://localhost:8080/;
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;
}
ssl on;
ssl_certificate /etc/nginx/ssl/openhab.<mydomain>/server.crt;
ssl_certificate_key /etc/nginx/ssl/openhab.<mydomain>/server.key;
}
Normal usage is okay, but every time I access https://openhab.<mydomain>:8084/
OpenHAB redirects to http://openhab.<mydomain>:8084/start/index
without HTTPS, which results in a 400 Bad Request:
This is the same for OpenHAB 2.3.0 and 2.4.0
Luckily that can be simply worked around with defining a “HTTPS error page” for the non-standard HTTP error code 497
error_page 497 =301 https://$host:$server_port$request_uri;
… but is this a known bug or just a configuration error on my side / in the documented example?