zalo250
By:
zalo250

How do I Host 3 static sites in 1 Droplet

October 23, 2016 118 views
Configuration Management Ubuntu 16.04 Ubuntu

I have 3 different domains and I want to host them in the same droplet. Any idea how can I do it? My idea is create a droplet with 16.04.1 x64 but then I have not idea what I have to do. Any suggestion? thanks.

2 Answers

That depends on web server you are using. To host anything you will need to have web server. You can chose between Apache or Nginx.

How to install LAMP stack will get you covered for Apache (and PHP/MySQL).
There is also How to install LEMP stack. Only difference between LAMP and LEMP is that LAMP is based on Apache Web server and LEMP is based on Nginx (Engine-X) Web server.
Also you can use One-Click Apps, which you can learn more about it - here.
Keep in mind, you chose only LAMP OR only LEMP

To setup multiple sites you will also have to setup virtual host (or also called server blocks on Nginx).
To setup Virtual Hosts on Apache - follow this tutorial.
If you decided to use Nginx, you must follow How To Set Up Server Blocks on Nginx.

A "LAMP" stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is...

I recommend using nginx instead of apache as it uses less memory. Does your websites use mysql??? Is yes the go for LEMP. Send me a message if you need help.

Have another answer? Share your knowledge.