I have a server at home that I plan to use to host two websites using Apache, I bought two domains and made them go to my server IP, but the problem is that it only works for one of them, if I enter
domain1.com it goes to
/domain1, if I enter
domain2.com it still goes to
This is my configs for them, I did this by reading some tutorials and such.. Can you please explain what did I do wrong here?
<VirtualHost *:80> ServerName domain1.com ServerAlias www.domain1.com DocumentRoot "C:\apache\htdocs\domain1" </VirtualHost> <VirtualHost *:80> ServerName domain2.com ServerAlias www.domain2.com DocumentRoot "C:\apache\htdocs\domain2" </VirtualHost>