Question

Apache or Nginx Reverse Proxy

I have Ubuntu 16.04 LTS vps on a vps provider (linode). Also domain name as yildiziot.com

I am doing some test and trying to learn.

I have installed node-red on that vps. A while ago i can access with yildiziot.com:1880. But now i cant.

I have also installed emq on the same server.

What i am trying to do, when i type from any web browsers address bar “node-red.yildiziot.com” i need to get node-red page ( if it is possible, i like to enter user name and password). When i type mqtt.yildiziot.com i need to get emq’s dashboard page so i can make some changes.

Also node-red.yildiziot.com/map should open map, /dashboard should open node-red dashboard.

I realy tried so many things. In my country it is 02:17 am right now. But i do not know what i did.

What should i do?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I will try this right away. But i have an another question.

If i want to publish my web sites (more than one. they are subdomains and about 4 or 5 pcs), do i need conf file for each web sites?

Here’s an example of nginx config to reverse proxy a node-red server (websocket support)

server {
  listen 80;
  server_name your_server_name;

  access_log /var/log/nginx/access.log;

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