Question

Host multiple websites in one droplet

  • Posted September 7, 2014

Hello guys, Is it possible to run like 2 or 3 websites on 1 droplet or do I need to buy another droplet with for each website? If its possible how do I manage this? Does it work like virtual hosts ? Any tutorial or feedback would be nice :)

Subscribe
Share

If you have a nice fat droplet you can put quite a few domains on there and give them a gig of memory each. 1 gb of memory with fast computing and aws route 53 or google cloud to manage dns records - you can literally run (IMO) 1 application/domain per GB of ram and a half of a cpu. NGINX all the way nginxhosting.co - DO is how we started. That’s what got my wheels turning and it’s so easy to spin up a droplet. Security precautions have to be taken - but get apparmor and some ssl certs, you will be just fine. I don’t even mess with Apache at all. NGINX is so much simpler - anyone that says otherwise is nuts! Comodo (no I’m not an affiliate and their certs are a real pain to install - but once you do it once, it’s easy). They have multidomain certs (sans) and they actually cover subdomains too so it’s like having one cert that covers everything. 29 bucks! That’s for 3 but it’s like 2 dollars for each additional domain which is not bad at all.

Yes, it’s just like virtual hosts. Just point the second domain to the DigitalOcean nameservers and follow this tutorial: http://justajot.com/articles/hosting-multiple-domains-with-nginx-in-ubuntu-14-04-on-digital-ocean/

If you’re using Apache, it’s pretty much the same. You can follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Yes, it’s just like virtual hosts. Just point the second domain to the DigitalOcean nameservers and follow this tutorial: http://justajot.com/articles/hosting-multiple-domains-with-nginx-in-ubuntu-14-04-on-digital-ocean/

If you’re using Apache, it’s pretty much the same. You can follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Yes, it’s just like virtual hosts. Just point the second domain to the DigitalOcean nameservers and follow this tutorial: http://justajot.com/articles/hosting-multiple-domains-with-nginx-in-ubuntu-14-04-on-digital-ocean/

If you’re using Apache, it’s pretty much the same. You can follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Yes, it’s just like virtual hosts. Just point the second domain to the DigitalOcean nameservers and follow this tutorial: http://justajot.com/articles/hosting-multiple-domains-with-nginx-in-ubuntu-14-04-on-digital-ocean/

If you’re using Apache, it’s pretty much the same. You can follow this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Could someone tell me if it would be possible or how (what type of configuration if not this one?) it would be possible to deploy a .NET Core 2 for Linux as well as a PHP Laravel Application. I get the nuances of virtual hosts but I’ve never deployed .NET Core to NGINX and would love to have an all in one solution to my existing apps and sites which are primarily .NET Core (not .NET Framework, but .NET Core - cross-platform with CLR and API from .NET Framework that works across them all). Should I use NGINX or a LEMP stack and could I deploy my .net core work to any of these (or ubuntu) and what would be the pros and cons to going one way vs. another. I know NGINX is great for Laravel and I believe that was the way to deploy some of the earlier testing and beta projects microsoft laid out prior to .net core you could host on Windows Server or Ubuntu with NGINX or something to that nature. I’m not great at this but i’m also a quick read. Any help from vets out there who may be able to shine some light or a simple step-checklist of what it would take. And is it worth it or am I better off just sinking more into another droplet. This is just for Portfolio work. I use A2hosting which has been down for 3+ weeks. I’m livid but professionally I use Forge and Digital Ocean or AWS Primarily. Privately Digital Ocean and Azure but not as familiar with multiple subdomains or multi-site deployments or virtual host on Digital Ocean, I know apache2 I know how to configure it for the most part but I would think this would be doable and capatible, but which would be best, would this post’s solution be the best? Or just go for a ubuntu server and install my way through. I’d like to get the most out of it and most optimized and while keeping it as simple as possible, although it’s a bit more complex than i’m used to and I host alot of work. Primarily PHP. Any .NET Core users who use both on this setup? How it is? Thanks for the comments and questions. Any insight would be HUGE!

Nobody pays for certificates no more, check out LetsEncrypt for a free one… You can include sub-domains too.


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.

What about MX records, how do you set up for multiple domains hosted on one droplet?

Hello there,

You can host multiple sites (domain names) on a single droplet, this can be achieved using virtual hosts.

The process is really simple, all you need to do is to spin up the droplet via the app marketplace and then manually add the virtual hosts for the other sites.

We have an article that covers the process, which you check here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04

Hope that this helps! Regards, Alex

Here is complete tutorial for hosting Multiple websites in single Droplet

https://arkayapps.com/blog/how-to-host-multiple-website-on-one-droplet-on-ubuntu-linux-14-04-lts/

Guys. All the links seems not to work. Do you have a new link with a tutorial? Thanks for your help

Here is complete tutorial for hosting Multiple websites in single VPS server without purchasing amazon route53 check this link for full tutorial

I would just like to add this helped me just now. Thanks :)

This comment has been deleted