I wanted to try Node-Red and have installed it on my Ubuntu server. This server runs an apache reverse proxy but I can't get it to work right. If I create a virtualhost for the HTTP connection I can access my Node-Red interface just fine, but it doesn't show me any activity such as online MQTT servers or debug messages. After some googling I found out this is because it also uses websockets and those have to be passed through as well.
And here is the puzzle I didnt manage to solve: I can pass through either HTTP or websockets, but not at the same time. If I pass through HTTP, load the Node-Red webinterface, and then change the reverse proxy settings to WS passthrough, I get full functionality. However I'm not able to reload or reconnect to the Node-Red page because HTTP passthrough was removed.
How do I add both on the same domain and port? or is this not possible at all? Here is some of my apache2 configuration:
<VirtualHost *:80>
ServerName nr.domain.com
Redirect permanent / https://nr.domain.com/
RewriteEngine on
RewriteCond %{SERVER_NAME} =nr.domain.com
RewriteRule ^https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
ServerName nr.domain.com
SSLEngine On
<Location />
ProxyPass http://localhost:1880/
ProxyPassReverse http://localhost:1880/
</Location>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/nr.domain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nr.domain.com/privkey.pem
</VirtualHost>
If I add a location with ProxyPass ws:// and so on, the live info and debugger work, but the webinterface is no longer accessible. How do I modify my apache config file in a way that both work?