Re: Apache: confusion about virtual hosts and DNS on a local network

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



Niki Kovacs wrote:
> nate a écrit :
>> I think your issue is this, if these are different
>> virtual hosts I would set the ServerName to be
>> the name of the virtual host itself.
>>
> 
> I think I found the error. Not exactly sure, but here goes. My virtual 
> host configuration works OK when I view each site with its fully 
> qualified domain name, e. g.
> 
> - http://microlinux.buildbox.presbytere.local for site 1
> 
> - http://kikinovak.buildbox.presbytere.local for site 2
> 
> Only the shorter form doesn't work, which means 
> http://microlinux.buildbox and http://kikinovak.buildbox both result in 
> viewing site 1. Which lets me carefully deduce that virtual hosts need 
> to be called by their fully qualified domain name.
> 
> Correct me if I'm wrong.

Virtual hosts are selected by matching on your ServerName setting, so it's 
whatever you put there - which also has to be something that works in DNS to 
reach it which would be the fully qualified name for anyone who doesn't have you 
domain in their search list.   ServerName takes a single value, but if you want 
additional names to be accepted you can add them to a ServerAlias setting which 
can have more than one.

-- 
   Les Mikesell
    lesmikesell@xxxxxxxxx

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux