Question

How do I Host 3 static sites in 1 Droplet

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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

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.