[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] [550] DNS -- redirect to a default URL



> -----Original Message-----
> From: Brian Rahill [mailto:cobalt@xxxxxxxxxxxxxxxxxxxxxxx] 
> Sent: Wednesday, March 24, 2004 4:34 PM
> To: cobalt-users@xxxxxxxxxxxxxxx
> Subject: Re: [cobalt-users] [550] DNS -- redirect to a default URL
> 
> >
> >How do I change this behavior so a mistyped URL redirects to
> >www.my.domain.com?  Can I simply rearrange the entries in 
> the records file,
> >putting www.my.domain.com as the topmost entry?
> 
> Okay. Well I think your problem is with Apache and not with DNS.
> What happens is that your DNS provider is pointing the 
> *.mydomain.com to 
> the IP of your machine.
> Since you don't have site setup with all possible aliases of 
> *.mydomain.com, Apache doesn't recognize it as belonging to a 
> particular 
> site so what it does is serve the pages from the first 
> <VirtualHost> block 
> that it encounters.
> 
> What the 550 apache setup does is create an include file for 
> each site. 
> These includes are located here: /etc/httpd/conf/vhosts
> It then loads them all at the bottom of httpd.conf like this:
> Include /etc/httpd/conf/vhosts/site1
> Include /etc/httpd/conf/vhosts/site2
> Include /etc/httpd/conf/vhosts/site3
> Include /etc/httpd/conf/vhosts/site4
> 
> So, if your main site number changed when you CMU-Imported 
> then it's likely 
> not the first one listed to be included.
> 
> Find the site number of your main site and move it to the top 
> of this list. 
> For instance if your main site is now site4 then do this:
> 
> Include /etc/httpd/conf/vhosts/site4
> Include /etc/httpd/conf/vhosts/site1
> Include /etc/httpd/conf/vhosts/site2
> Include /etc/httpd/conf/vhosts/site3
> 
> Then restart apache and test it.
> 
> Brian 

That was it exactly and your suggestion worked perfectly.  By the way, the
records file was a leftover from a previous migration from an XTR to the
550.  Thanks for the help.  I'm still getting used to the 550 style after a
couple of years immersed in the XTR.

Tom