Hello everybody,
I started with OpenHab 2.2.0, running on a raspberryPi
Basic setup works fine, I added some bindings, things, items and sitemaps.
Now I configured a reverse proxy to allow a public connection to my OpenHab.
Reverse proxy is a WIN10-box + IIS + ARR
https://www.iis.net/downloads/microsoft/application-request-routing
internet --> http://myDomain --> ARR --> http://InternalIP:8080
I managed to configure my reverse proxy and can connect to my OpenHab box with a browser to the PaperUI.
Strange thing is that -when I go to the BasicUI, my items are displayed, but on my browser I get a message “Offline: waiting for connection to become available”.
Also, on my Android app: I can see my sitemaps, but when I open a sitemap, my items are NOT displayed, and I see a spinning wheel right on top of my app.
When I go directly to my OpenHab box (I opened my firewall on port 8080 and forwarded directly to my OpenHab-box), the BasicUI and Android app work properly.
So I suppose my reverse proxy rules are not complete.
Below you can find my web.config configuration file.
Has anybody an idea what’s wrong?
I can find documentation for other reverse proxies like ngix, apache, … but not for IIS
Any help is much appreciated!
Kind regards,
Bart
This is NOT working:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Let's Encrypt" enabled="true" stopProcessing="true">
<match url="(.well-known/acme-challenge/*)" />
<action type="None" />
</rule>
<rule name="Redirect to HTTPS" enabled="false" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Temporary" />
</rule>
<rule name="ReverseProxy" stopProcessing="true">
<match url="(.*)" />
<action type="Rewrite" url="http://192.168.4.83:8080/{R:1}" logRewrittenUrl="true" />
<serverVariables>
<set name="HTTP_X_PRIVATE_TOKEN" value="We are the children of Korn!" />
<set name="HTTP_SEC_WEBSOCKET_EXTENSIONS" value="" />
<set name="HTTP_X_ORIGINAL_HOST" value="{HTTP_HOST}" />
<set name="HTTP_X_REAL_IP" value="{REMOTE_ADDR}" />
<set name="HTTP_X_FORWARDED_FOR" value="{PROXY_ADD_X_FORWARDED_FOR}" />
<set name="HTTP_X_FORWARDED_PROTO" value="HTTP" />
</serverVariables>
</rule>
</rules>
</rewrite>
<caching enabled="false" enableKernelCache="false" />
</system.webServer>
</configuration>
PS.
I configured the same ARR to my other services (NexCloud, Domoticz, HASS, etc…) without any problem. So this should be something OpenHab specific…