Multiple Websites on a Single Droplet

September 1, 2019 193 views
Apache MySQL PHP WordPress Ubuntu 18.04

Hey.

I’m aware that this question has some detailed answers on many platforms including Digital Ocean Community, but the thing is, as far as I come along they are a bit
outdated currently (Please feel free to correct me as I would much appreciate it). There are 3 suggestions right now in the “Do any of these answer your question?” section and the closest date is from 4 years ago.

So, here’s my exact details about my situation;

I deployed a Ubuntu 18.04 droplet, installed Apache2 for web server, then installed MySQL and PHP. So it’s a LAMP stack.

I’ve used these following pages and they were great. Thanks to all of their authors.

https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-ubuntu-18-04

I need to learn managing multiple wordpress sites in this droplet, each will have their own domains. Digital Ocean has a Wordpress tutorial in here (https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04) which I also will follow along but since it doesn’t cover creating multiple sites, here’s my attempt to ask for resource advice.

Thank you and wish you all a great day.

2 Answers

Hello,

You can host multiple websites on one droplet by adding multiple Apache Virtual Hosts.

Here’s a step by step article on how to do that:

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

Let me know if you have any questions.

Regards,
Bobby

by Brennen Bearnes
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 16.04 server.

Hey,

So Ubuntu 16.04 tutorials are also valid for Ubuntu 18.04 , right?

Have another answer? Share your knowledge.