I have added 2 virtual hosts to my apache2 conf file as below:
<VirtualHost *:80> DocumentRoot /var/www/html/site1 ServerName www.site1.com ServerAlias site1.com </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/html/site2 ServerName www.site2.com ServerAlias site2.com </VirtualHost>
I then got the error after restarting apache i get:
[warn] default VirtualHost overlap on port 80, the first has precedence
Searched google and they said to uncomment the line below, so I did:
Restart, and now I don't get the error, but both sites go to the first site.
running Centos5. How do I fix this problem?