What's the correct way to set up SSL for a subdomain pointing to a separate Droplet?

Posted November 4, 2014 4.3k views

I have two droplets set up.

One of them is just hosting the static, public facing side of the site and Is running off of nginx. I set up the DNS and nginx so that the url looks like this:

I then set up another dns and droplet. The dns is set up so that request made to (notice the subdomain) will go to the second droplet.

The second droplet is running node.js and is serving up a meteor app.

I need the subdomain on the second droplet to be served with SS:

What is the correct way to do this? Do I need to install nginx on my second droplet to get this to work?

Also worth mentioning: I didn’t even need to configure nignx on my first droplet to redirect to the second droplet. It was just automatic after I set up the CNAME and A record.

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
1 answer

Setting up an Nginx reverse proxy in front of the Meteor app to handle SSL is probably the best way to do this. Check out this tutorial for more info:

Also, make sure you are using a “wildcard” SSL certificate to support multiple subdomains.

by Daniel Speichert
Deploy a Meteor.js application on Ubuntu 14.04 with Nginx and MongoDB. This tutorial shows you how to build and deploy a production-ready version of your JavaScript application using the Meteor framework.