There are two types of Apache virtual host configurations:
- IP-Based Virtual Host
- Name-based Virtual Host Name-based virtual host is recommended for most scenarios.
IP-Based Virtual Host
In this configuration, when you are pointing two websites (with different ip-address) to the server that runs Apache, that physical server should have two different ip-address configured.
Name-Based Virtual Host
In this configuration, when Apache webserver receives a request, it looks for the hostname in the HTTP header, and depending on the hostname, it servers different websites. This is very easy, as you need only one ip-address on that physical server; but, you update the DNS with multiple website names pointing to the same ip-address.