I have NodeRed running with Docker (running on Windows, using Linux containers). When connecting to NodeRed with localhost:1880 everything works fine. NodeRed is connected to the www with Apache as webserver (running on windows). When trying to access NodeRed externally I can login and I can see my flows, but as soon as I'm displaying the page I get the message 'connection lost, trying to reconnect in x seconds'.
Any ideas what may cause this? I cannot find anything strange in the logfiles from NodeRed or Apache.
Most likely, you haven't proxied the websocket connections. There are examples in the forum and elsewhere on how to do that. You have to proxy both HTTPS and WSS.
Great, thanks for the quick reply. I googled a lot before asking the question and couldn't find anything. But apparently I was looking in the wrong direction. I added the next rows to my existing vhost in Apache to fix it:
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /kpn(.*) ws://localhost:1880$1 [P,L]
ProxyPreserveHost On
ProxyRequests Off
ProxyVia Off