Reverse proxy on .local urls

  • Platform information: Raspberry Pi 2 Model B Rev.1.1
    • OS: Raspbian GNU/Linux 9 (stretch)
    • openHAB version: openHAB 2.2.0-1 (Release Build)
  • Issue of the topic:

I installed the openHABianPi preconfigured iso and configured it until it woked without ssl certs. Then add ed the SSL part from here:
I was able to reach my panel with openHABianPi.local before then after installing the self signed SSL cert not more. With some tinkering i figured out that there was a .local missing in the forwarding to https://openhabianpi/start/index because this worked: https://openhabianpi.local/start/index.
But this happens now with all requests.
Like if i click on the “OPENHAB LOG VIEWER” icon on the start panel, i get the same issue, it links to : http://openhabianpi:9001/ what does not work because its missing the .local in the TLR field. Adding it i get to the requested site http://openhabianpi.local:9001/ works perfect.
how can i add that .local all the times?
Thanks, Novksi

this is my config:

server {
listen 80;
server_name openHABianPi;
return 301 https://$server_name$request_uri;
server {
listen 443 ssl;
server_name openHABianPi;

    ssl_certificate                                /etc/ssl/openhab.crt;
    ssl_certificate_key                            /etc/ssl/openhab.key;

    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;
            satisfy                               any;
            allow                       ;
            allow                       ;
            deny                                  all;
            auth_basic                            "Username and Password Required";
            auth_basic_user_file                  /etc/nginx/.htpasswd;


Hello @novski,

Did you find a way to configure the proxy for the port 9001 (log viewer) in nginx ?

Just bumping this because I’m having the same issue. Node Red and log viewer are both missing the .local part of the URL.

I’m sorry that i didn’t reply. I did not solve it and i quit the testing of openHAB afterwards.

You can edit the URLs and add/remove tiles in the config/services/dashboard.cfg file (/etc/openhab2/services/dashboard.cfg by default on openhabian/apt installed linux) to add the .local. You might have to restart openhab for it to reflect the change

1 Like

Thank you! This is exactly what I was looking for! No need to restart, just had to reload the web page.