Report this

What is the reason for this report?

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

Posted on November 4, 2014

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: www.site.com.

I then set up another dns and droplet. The dns is set up so that request made to my.site.com (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: https://my.site.com.

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.



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!

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.

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.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.