mhlavacka
mhlavacka

Reputation: 701

Host multiple meteor application on DigitalOcean

I need to run two meteor applications at the same Digital Ocean droplet. Following this tutorial I successfully get both apps to work on my-domain.com:3000 and my-domain-1.com:3001, but I can't get reversing proxy using Nginx done. Following the tutorial I came up with the following:

First app configuration file:

server {
 listen 80;
 server_name http://saveting.com;

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

Second app configuration:

server {
 listen 80;
 server_name http://downloadinstagramvideo.com;

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

EDIT1 :

The problem was that nginx has to be restarted before implementing changes. Works after using:

sudo service nginx start

Upvotes: 1

Views: 201

Answers (1)

Richard Smith
Richard Smith

Reputation: 49802

The server_name directive should not include the scheme name, use:

server_name saveting.com;

and

server_name downloadinstagramvideo.com;

Upvotes: 2

Related Questions