Question

Redirecting to another droplet from a secure droplet through subdomains

Hi,

I have successfully created a droplet with Ubuntu 16.04 running my secure django app through Letsencypt. My droplet serves “example.com” and “www.example.com” and I can see the green lock on my firefox when pointing to this application.

I would like to create two subdomains (sub1.example.com and sub2.example.com) but on two other droplets. I would like to know the exact procedure if possible.

I understand that the first step is to “expand” the letsencrypt keys to include the two new domains. But what comes next? Please, can you be as much elaborate as possible? Please, keep in mind that the new droplets will have to be secure, too.

Subscribe
Share

Submit an 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.

Accepted Answer

@xpanta I think you are misunderstanding me. Your DNS A-records should look like this:

@    -> droplet_ip_1
www  -> droplet_ip_1
sub1 -> droplet_ip_2
sub2 -> droplet_ip_3

Then you can use Let’s Encrypt to encrypt example.com and www.example.com on Droplet1. And you can encrypt sub1.example.com on Droplet2, and sub2.example.com on Droplet3.

Hi @xpanta

You simply point the DNS A-record for dns1.example.com to another droplet, login to that droplet and work on that, just like you did on the first droplet.

You need to generate the Let’s Encrypt from the droplet that are going to use it. It is possible to do some advanced stuff, but that’s outside the scope.

So in some sense, the different droplets and their certificates has nothing to do with each other.