Forum Moderators: phranque

Message Too Old, No Replies

http://www.mysite.com and http://mysite.com do not give same results

         

doucetted

12:28 am on May 20, 2005 (gmt 0)

10+ Year Member



I'm not sure if this is a BIND issue or an APACHE issue.

In my Vhosts.conf is the following;

################# Named VirtualHosts
UseCanonicalName off
NameVirtualHost 192.168.100.100
#<VirtualHost 111.222.33.44>
#ServerName www.domain.tld
#ServerPath /domain
#DocumentRoot /web/domain
#</VirtualHost>

# Virtual host www.mysite.com
<VirtualHost 192.168.100.100>
DocumentRoot /var/www/html/mysite/
ServerAdmin admin@mysite.com
ServerName www.mysite.com
</VirtualHost>

# Virtual host www.bobssite.com
<VirtualHost 192.168.100.100>
DocumentRoot /var/www/html/bobssite/
ServerAdmin admin@bobssite.com
ServerName www.bobssite.com
</VirtualHost>

# Virtual host www.janessite.com
<VirtualHost 192.168.100.100>
DocumentRoot /var/www/html/janessite/
ServerAdmin admin@janessite.com
ServerName www.janessite.com
</VirtualHost>

When I enter www.bobssite.com in a browser I get index.html from /var/www/html/bobssite/ but when I enter [bobssite.com...] I get index.html from /var/www/html/mysite/ and the same thing with janessite.

Is this perhaps an issue with a zone file in named or is it an apache problem I'm having.

Thank you for your insight.

jdMorgan

12:50 am on May 20, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I see no ServerName or ServerAlias for "bobssite.com" in the config code, so I'd expect the results you are seeing. www.bobssite.com and bobssite.com are two different domains, and can be two different Web sites.

Jim

doucetted

2:05 am on May 20, 2005 (gmt 0)

10+ Year Member



wow that was quick...

I added;

ServerAlias www.bobssite.com bobssite.com

and it now works.

Thanks!