Server 10.3.9: non-standard URLs don't resolve correctly

srciaran

Registered
I have three web sites hosted on the same server:
www.siteA.com
www.siteB.com
www.siteC.com

If a user types http://www.siteB.com, all is fine. If the user types http://siteB.com (no www.), they get siteA.com instead. How do I resolve this? There are lots of lazy people out there who are potentially getting directed to the wrong site. I have no capability of using ports or unique IPs to help differentiate the domains, just the addresses themselves.
 

srciaran

Registered
Okay, talking to myself now: Is it as simple as defining a new site as siteB.com and pointing it to the same location/folder? Is there any down side to this, or is this the accepted method?
 

tjoneslo

Registered
srciaran said:
I have three web sites hosted on the same server:
I have no capability of using ports or unique IPs to help differentiate the domains, just the addresses themselves.
This is a shortcoming of the web admin tool. Read up on the use of the ServerAlias directive for the apache server. You will need hand edit the site configuration files (in /etc/httpd/sites) to add this directive to the config files and restart the Apache server.

I've set up my multisite server the opposite way. That is, the default site is http://siteA.com, http://siteB.com. Then in the config file I add the following line:

ServerAlias *.siteA.com
 
Top