Apache2 Virtual Hosts not recognizing properly

You need NameVirtualHost set up.

Open ports.conf and add: (You can also put it above the first <virtualHost>

NameVirtualHost *:80
Listen 80

You can also use the ip address instead of the wildcard.

Your vhost has to be formatted exactly the same as the NameVirtualHost format.

If it's formatted like this:

NameVirtualHost 1.2.3.4:8080

then vhost should be:

<VirtualHost 1.2.3.4:8080>