Browse Source

fix node-red debug window websocket connection

Thomas Buck 2 years ago
parent
commit
118fde7b7e

+ 4
- 0
roles/iot/tasks/nodered.yml View File

11
 - name: Run Node-Red install script
11
 - name: Run Node-Red install script
12
   shell: /root/nodered/update-nodejs-and-nodered --confirm-root --confirm-install --skip-pi --restart --update-nodes
12
   shell: /root/nodered/update-nodejs-and-nodered --confirm-root --confirm-install --skip-pi --restart --update-nodes
13
 
13
 
14
+- name: Enable Apache wstunnel module
15
+  command: a2enmod proxy_wstunnel creates=/etc/apache2/mods-enabled/proxy_wstunnel.load
16
+  notify: restart apache
17
+
14
 - name: Register new Node-Red service
18
 - name: Register new Node-Red service
15
   systemd: name=nodered daemon_reload=yes enabled=yes
19
   systemd: name=nodered daemon_reload=yes enabled=yes
16
 
20
 

+ 4
- 0
roles/iot/templates/etc_apache2_sites-available_grafana.j2 View File

11
     ServerAlias {{ domain }}
11
     ServerAlias {{ domain }}
12
 
12
 
13
     SSLEngine               On
13
     SSLEngine               On
14
+    SSLProxyEngine          On
14
     DocumentRoot            "{{ item.doc_root }}"
15
     DocumentRoot            "{{ item.doc_root }}"
15
     DirectoryIndex          index.html
16
     DirectoryIndex          index.html
16
     Options                 -Indexes
17
     Options                 -Indexes
25
     ProxyRequests           Off
26
     ProxyRequests           Off
26
     ProxyPreserveHost       On
27
     ProxyPreserveHost       On
27
 
28
 
29
+    ProxyPass               /nodered/comms ws://localhost:1880/comms
30
+    ProxyPassReverse        /nodered/comms ws://localhost:1880/comms
31
+
28
     ProxyPass               /nodered/ http://localhost:1880/
32
     ProxyPass               /nodered/ http://localhost:1880/
29
     ProxyPassReverse        /nodered/ http://localhost:1880/
33
     ProxyPassReverse        /nodered/ http://localhost:1880/
30
 
34
 

Loading…
Cancel
Save