[TriLUG] Problems with webserver at home
Roy Vestal
rvestal at trilug.org
Wed Mar 12 10:30:30 EDT 2008
Ahh...makes sense. Thanks Alan. I'll try it as soon as I can.
Alan Porter wrote:
>> How would I go about adding the virtual hosts?
>>
>> 10.0.0.1 firstsite.example.com
>> 10.0.0.1 secondsite.example.com
>>
>
>
> /etc/hosts
> 10.0.0.1 firstsite.example.com secondsite.example.com
>
>
> You're dealing with two things here: DNS and HTTP. Your DNS is hosed,
> but your HTTP is fine.
>
> Fix the DNS by adding entries to /etc/hosts. The HTTP will work
> like it always has.
>
> 1) internal machine wants secondsite.example.com
> 2) looks up IP in /etc/hosts
> 3) connects to 10.0.0.1
> 4) sends http request to apache, asks for secondsite.example.com
> 5) apache matches that request with the right virtualhost stanza
>
> It does not matter that all of your virtual hosts resolve to the
> same IP address. That's what they do on the external internet,
> right? So it is no different on your internal LAN... they just
> use private addresses internally.
>
>
> Alan
>
>
>
>
>
> .
>
>
>
More information about the TriLUG
mailing list