[H-GEN] Apache and Virtual Hosts

Steve sjthorne at ozemail.com.au
Thu Dec 9 20:36:03 EST 1999


[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics.  Please observe the list's charter.          ]

Well I could be wrong (I'm reasonably new at Apache configuration), but if
both your servers have the same IP (which according to nslookup they do),
how will your server tell which one is being accessed?  Surely you need
two different IP addresses so that Apache can work out which set of
pages to serve.

> I am including an exert from the httpd.conf so people can see what I am
> doing. Any assistance is appreciated.
> The machines IP is 130.102.32.23 and it's name is stevens.psy.uq.edu.au
> also the name fire.humbug.org.au resolves to it :)
>
> NameVirtualHost 130.102.32.23
>
> <VirtualHost 130.102.32.23>
>         ServerAdmin nikolai at humbug.org.au
>         DocumentRoot /var/virt/fire.humbug.org.au
>         ServerName fire.humbug.org.au
>         ErrorLog /var/log/apache/fire.humbug.org.au-err
>         TransferLog /var/log/apache/fire.humbug.org.au-trans
> </VirtualHost>
>
> <VirtualHost 130.102.32.23>
>         ServerAdmin nikolai at humbug.org.au
>         DocumentRoot /var/www
>         ServerName stevens.psy.uq.edu.au
>         ErrorLog /var/log/apache/error.log
>         TransferLog /var/log/apache/transfer.log
> </VirtualHost>


Eeek! I'm using Outlook 2k (shoot me now, I deserve it) and I don't get the
>> things.. Suffice it to say that what I'm typing now is my addition and
anything above this paragraph isn't.

Virtual hosts works by detecting if you are looking at
http://stevens.psy.uq.edu.au or http://fire.humbug.org.au - and sends you
the pages accordingly. For the life of me I can't remember what happens when
you try to go to http://130.102.32.23 however.

Steve.


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.



More information about the General mailing list