Hello all
I just followed the instructions of Benjy but I can not get ot work.
When I enter
http://openhabianpy
into my browser it always redirects to
https://start/index
This is the config at /etc/nginx/sites-enabled/openhab
server {
listen 80;
listen [::]:80;
server_name openhabianpi.fritz.box;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name openhabianpi.fritz.box;
ssl_certificate /etc/ssl/3bert.crt;
ssl_certificate_key /etc/ssl/3bert.key;
add_header Strict-Transport-Security "max-age=31536000"; # Remove if using self-signed and are having trouble.
location / {
proxy_pass http://localhost:8080/;
proxy_buffering off;
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;
auth_basic "Username and Password Required";
auth_basic_user_file /etc/nginx/.htpasswd;
}
}
What is wrong?
Thank you very much in advance!
Best regards,
Matze