I'm trying to setup two domains correctly. I have some issues I hope you can help me. Site one's conf:
<VirtualHost myipaddress:80> ServerName www.domain1.com ServerAdmin firstname.lastname@example.org DocumentRoot /home/domain1/public_html </VirtualHost>
My other domain conf is:
<VirtualHost myipaddress:80> ServerName www.domain2.com ServerAlias *.domain2.com domain2.com ServerAdmin email@example.com DocumentRoot /home/domain2/public_html </VirtualHost>
The default site is disabled. The problem is that when accessing "domain2.com" from my browser, it always redirects to "www.domain1.com". It only works when I excplicitly access "www.domain2.com". I have also other domains like "domain1.net", "domain1.info" pointing to my server but at this moment are not configured either setup on Apache yet I can access from browser and always accessing to "www.domain1.com".
By the way is there any possible configuration over Apache to handle IP only, I mean if I type "http://myipaddress/" I get the "www.domain1.com"... Arrgh.