Areku
By:
Areku

Multiple sites or multiple droplets?

March 20, 2017 768 views
Applications Ubuntu 16.04

I am in doubt whether to add a second domain to my droplet or if i should create another droplet to host a new domain. Someone to shed a light on this issue?

2 Answers

@Areku Well, it depends on what you're hosting. If it's the same system, just different domains, then it might be easier and beneficial to have everything in on server.
But maybe you want to separate everything for security, legal or maybe accounting purposes, then you would use multiple servers.
There's no clear answer.

@hansen

Yes, the same system, just another domain, different sites, but both on wordpress. But i would like this additional domain have also the https prefix. Is it possible? Do we have a orientation on to set up the certificate in this tutorial [https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04](http://)?

  • Okay, I'm guessing you're talking about Let's Encrypt - if yes, follow this guide:
    https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04

    In this tutorial, we will show you how to use Let's Encrypt to obtain a free SSL certificate and use it with Nginx on Ubuntu 16.04. We will also show you how to automatically renew your SSL certificate. If you're running a different web server, simply follow your web server's documentation to learn how to use the certificate with your setup.
    • I followed this tut, but I am serving multiple domains from one droplet. is it possible to have multiple certs per single droplet?

      these lines are problematic:
      listen 443 ssl http2 defaultserver;
      listen [::]:443 ssl http2 default
      server;

      because you can use default_server only once
      I've tried a couple different approaches but this might not be possible

      • Hi @kylebradshaw
        Correct, just use default_server once - or not at all.
        You can have multiple certificates, just like you can have multiple domains, hosted from the same web server.
        But since it seems like your problem might be a little different, so can you start a new question instead?

Have another answer? Share your knowledge.