Apache or Nginx Reverse Proxy

Posted January 30, 2018 3.7k views
NginxApacheUbuntu 16.04

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

I am doing some test and trying to learn.

I have installed node-red on that vps. A while ago i can access with 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 “” i need to get node-red page ( if it is possible, i like to enter user name and password).
When i type i need to get emq’s dashboard page so i can make some changes.

Also 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?

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.

Submit an Answer
2 answers

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";

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?