Apache name resolution is not working and I cannot figure out why

So I’ve got a Virtual machine running with a wordpress lamp stack running. I configured each with a separate folder /var/www/site1.com/ /var/www/site2.com/ and each with it’s own apache .conf file.

The site1.com.conf file is formatted as

<VirtualHost *:80>

	ServerAdmin admin@site1.com
	ServerName site1.com
	ServerAlias www.site1.com
	DocumentRoot /var/www/site1.com

	<Directory "/var/www/site1.com">
	     AllowOverride All
	</Directory>

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

the second site is the same but site2.com in the .conf file. After enabling both sites and restarting apache I keep getting site2.com no matter what domain I use.I have dns resolution configured in pfsense to direct www.site1.com and www.site2.com to the ip of my virtual machine and it works as intended but I can’t access site1 without disabling site2 in apache. I thought this might possibly be a problem with the pfsense dns resolution so i switched the /etc/hosts file to point to my vm (which is running on another pc altogether) and I still only get site2. I’ve talked to google about it but I haven’t found a solution. Does anybody have any idea why name resolution isn’t working?