[CentOS] Virtualhost, Alias & Subdomains

Fri Jun 9 22:56:19 UTC 2006
Les Mikesell <lesmikesell at gmail.com>

On Fri, 2006-06-09 at 16:32 -0600, Dave Hornford wrote:

> > > The name as used in the browser URL must match exactly what you 
> > > specify as the ServerName or a ServerAlias (you can have more than one
> name there).
> > > Are you sure everything is spelled exactly right and you didn't omit 
> > > the domain name in the browser?  The first one in the list is used 
> > > if nothing matches.
> > s,
> > 
> > Thanks. In my testing I'm copying & pasting. I am getting the first in 
> > the list.
> > You mention more than one.
> > 
> > Could I skip the alias part and enter:
> > ServerName www.subdomain.domain.com subdomain.domain.com 
> > subdomain.altdomain.com www.subdomain.altdomain.com
> 
> No, ServerName may also be used in redirects so it is a special case.
> Do you have DNS working so all the names resolve to the same IP?  For
> testing you can use the hosts file on the machine running the browser to get
> the same effect.
> 
> --
> Les,
> Thanks. It seemed to easy. It looks like I may have a dns propagation
> problem. I am directed to the server and server is being directed to the old
> host.

If you enter a name which is actually a directory but omit the
trailing /, the server will redirect you with the new URL containing
the trailing / so subsequent relative links will work.  If you
have UseCanonicalName on, it will use the name specified as
ServerName for the redirect even if your inital URL used an
alias or IP.  Regardless, all DNS lookups should be done at
the browser client side.

-- 
  Les Mikesell
   lesmikesell at gmail.com