I have a CentOS 7 server running Apache 2, and am trying to host 2 sites. My two domain names are pointed to the server at IP 70.61.231.8.
verizondecom.com
windstreamdecom.com
On the server, I have a virtual host set up for each site.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName windstreamdecom.com
ServerAlias www.windstreamdecom.com
ErrorLog /var/log/httpd/windstreamdecom.err
CustomLog /var/log/httpd/windstreamdecom.log combined
DocumentRoot /var/www/windstreamdecom/public
SetEnv ENVIRONMENT "production"
<Directory "/var/www/windstreamdecom/public">
AllowOverride ALL
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName verizondecom.com
ServerAlias www.verizondecom.com
ErrorLog /var/log/httpd/verizondecom.err
CustomLog /var/log/httpd/verizondecom.log combined
DocumentRoot /var/www/www.verizondecom.com/public
SetEnv ENVIRONMENT "production"
<Directory "/var/www/www.verizondecom.com/public">
AllowOverride ALL
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
When I type in either domain name, I get the first Vhost (Windstream). The URL in the browser also changes to the server's IP address.
What am I missing here? I need to be able to go to both websites, and the URL should be the hostname, not the IP.