Sitemap Image not working behind Nginx

  • Platform information:
    • Hardware: Raspberry Pi 3
    • OS: Newest OSMC Version
    • Java Runtime Environment: 1.8.0_151
    • openHAB version: 2.1.0-1
  • Issue of the topic: OpenHAB does not Display Images in Sitemap when openhab is behind a Nginx reverse proxy.
  • Please post configurations (if applicable):


Text label="Taunus" {
        Image url="" label="Großer Feldberg"
        Image url="" label="Oberreifenberg"
        Image url="" label="Pechberg"

Nginx Config

        location / {
                proxy_pass                  ;
                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;
                #proxy_redirect http:// https://;

                auth_basic                            "Username and Password Required";
                auth_basic_user_file                  /home/;

HTTP Response for the Image

HTTP/1.1 400 Bad Request

I’ve just tried it on my system, and indeed, when you try to insert an external image (from outside your network), it doesn’t work…
I tried it with your links, and with some random images on the internet.

I never encountered it, since I use only images on my infrastructure (servers on the same network). :blush:
Maybe you can first pull the images towards your servers with fe a wget? And then you can put in your sitemap a local link…

I had this problem with earlier snapshots and could never work out if it was an openHAB bug, an nginx problem or something else. But on snapshot 1067 the images seem to work fine. No clue why!

(Although I don’t have proxy_buffering off in the nginx config - not sure if that makes a difference)

Thanks for your help. In OH 2.2 it is working fine.

1 Like