Using the VM function, you can split a running physical server into multiple "virtual servers ". However, this technology cannot isolate the hardware resources of the current cloud host technology, so that these virtual servers can use the hardware resources of physical servers together. Suppliers can only limit the disk space. Apache's virtual host function is based on the different IP addresses, host domain names, or port numbers requested by the server, to provide access services for multiple websites at the same time. The resources requested by users are different, the obtained webpage content is also different.
1. IP address based
If a server has multiple IP addresses and each IP address corresponds to each website deployed on the server, when a user requests to access different IP addresses, access the page resources of different websites.
Configure the IP address, restart the NIC service, and check network connectivity to ensure that the three IP addresses can be accessed normally.
Step 1: create three directories in/home/wwwroot to save the data of different websites, and write the homepage files of the websites to them respectively.
Red Hat 7 VM