Would you like to learn how to install Apache and configure multiple Websites on a computer running Ubuntu Linux? In this tutorial, we are going to show you how to use the Virtualhost feature to configure multiple Websites on the same Apache server.
• Ubuntu 18
• Ubuntu 19
• Ubuntu 20
• Apache 2.4.41
In our example, the IP address of the Apache server is 184.108.40.206.
In our example, we are going to create the website: WWW.GAMEKING.TIPS.
Apache Virtualhost – DNS configuration
Access the GODADDY website and purchase a DNS domain.
In our example, we purchased a domain named:
You can use any website to purchase a DNS domain, GoDaddy is just my personal choice.
Create a DNS entry pointing your website to the computer running Apache.
In our example, we created a DNS entry pointing WWW.GAMEKING.TIPS to 220.127.116.11.
Use the NSLOOKUP command to test your DNS configuration.
Here is the command output.
Congratulations! You have finished the required DNS configuration.
Tutorial Apache – Virtualhost configuration
Install the Apache server.
Enable Apache module named: Mod_rewrite.
Edit the Apache configuration file.
Add the following lines at the end of this file.
Create directories to store the new website files and logs.
The website files will be stored inside the following directory:
The website logs will be stored inside the following directory:
Create an Apache configuration file for the new website.
Here is the file with our configuration.
Enable the new website.
Restart the Apache service.
Open your browser and try to access the HTTP version of the website.
In our example, the following URL was entered in the Browser:
You have finished the virtual host configuration on the Apache server.
The post Apache Virtualhost – Multiple Websites on the same server appeared first on TechExpert.