How can I setting multiple domains in Apache2 on Linux 20.4

Posted November 19, 2020 1.1k views
ApacheUbuntu 20.04

My server on DO is a Ubuntu 20.4 with Lamp. Can I using this same tutorial to setting apache to host multiple domains?

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.

Submit an Answer
1 answer

Hi @georodrigues,

You can use the tutorial to create a new virtulhost file the same way you created the first one from in without a problem. Of course, you’ll need to change the name of the .conf file, the path where it should load the website, and the domain itself.

You can also follow this article:


by Lisa Tagliaferri
This tutorial will guide you through setting up multiple domains and websites using Apache virtual hosts on an Ubuntu 18.04 server. During this process, you’ll learn how to serve different content to different visitors depending on which domains they are requesting.