Apache2 Manage Server default
- by Jaime E. Valdez
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 hostmaster@domain1.com
DocumentRoot /home/domain1/public_html
</VirtualHost>
My other domain conf is:
<VirtualHost myipaddress:80>
ServerName www.domain2.com
ServerAlias *.domain2.com domain2.com
ServerAdmin hostmaster@domain2.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.