There are two Virtual Hosts that can be configured on an Apache Server. You can configure an IP-Based Virtual Host or a Name-based Virtual Host. Depending on the option that you chose, the configuration process is different. I suggest that you check the official website of Apache, where you have access to all the documentation that is available about this subject.
To debug the virtual configuration on your Apache Server, you can use the following command : /usr/local/apache2/bin/httpd -S