0

I currently have a setup of node-red running on raspberry pi stretch. the node-red doesnt have any problem when running local.

The raspberry pi is behind a nginx reverse proxy server. whenever being accessed on my domain, flow doesnt show up even any objects on the page. the only thing that is showin is the header bar.

I currently have a flow deployed before hand with some soft of dashboard, the /ui loads fine on the outside. like I said when accessing the admin/user pages, it looks fine. So I am guessing that the fault is in the nginx.

Anybody who has the same setup without problem? would you mind to share your config on nginx. Special thanks.

Node-RED version: v0.18.6

Node.js version: v8.11.2

System: Raspbian - Linux 4.14.34-v7+ arm LE

Nginx version: 1.14.0 Nginx Config:

server {
  listen 80;
  server_name xx.xx.xx.ph;

  location / {
    proxy_pass http://localhost:1880;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }
}

Chrome browser console error:

    blob:http://nberic.mmsu.edu.ph:1880/a74b9da3-2abf-4e9f-95ce-fbfb3573e0de:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
ace.js:1 Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
red.min.js:1 Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
vendor.js:1 Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
ext-language_tools.js:1 Uncaught ReferenceError: ace is not defined
    at ext-language_tools.js:1
main.min.js:16 Uncaught ReferenceError: $ is not defined
    at main.min.js:16
    at main.min.js:16
  • Strange -- I've been running my node-red service behind my nginx reverse proxy for quite a while and have not seen this problem... the one difference I can see with your server config is that I have the trailing '/' on the url for `proxy_pass http://localhost:1880/;` – SteveR Jul 09 '18 at 13:40
  • Hi, thanks for the feedback, I was able to fix the problem by changing the port from 1880 to 6xxx and used a different config we just found out. since we are running on single server. we used stream block instead of location. with our testing it is way better than using location block https://docs.nginx.com/nginx/admin-guide/load-balancer/tcp-udp-load-balancer/ – Rae Villena Jul 11 '18 at 00:22

0 Answers0