[NTLUG:Discuss] This will need a guru I think

Jeremy Blosser jblosser at firinn.org
Thu Jan 20 14:12:26 CST 2000


TJ Bell [tjbell at usa.net] wrote:
> Hope there are some Apache gurus out there.  Better yet, I hope this is
> possible.

Possible, and not even all that hard.  Heh.

> Situation I want to work:
>   Two different domain names pointed to the same IP:
>     tjbell.dhs.org     - 24.4.38.60
>     heshtime.dhs.org   - 24.4.38.60

First, if you haven't already, the DNS info for this needs to be setup.
This is external to Apache.

>   Apache recognizes which name the user typed in and takes it to
> appropriate
>   shtml page:
>     tjbell.dhs.org     - index.shtml
>     heshtime.dhs.org   - heshtime/index.shtml
>     24.4.38.60         - index.shtml

----------

NameVirtualHost 24.4.38.60
<VirtualHost 24.4.38.60>
DocumentRoot /path/to/index.shtml
</VirtualHost>

<VirtualHost 24.4.38.60>
ServerName heshtime.dhs.org
DocumentRoot /path/to/heshtime/index.shtml
</VirtualHost>

----------

Simple.  The first virtual host, since it doesn't specify a ServerName, is
the default and will catch both the tjbell and the 24.4... addresses.  You
can add as many as you want this way, provided the domain names are valid.
See the Apache manual on the NameVirtualHost and VirtualHost directives for
more info.  It's rather self-explanatory.

This info normally goes into httpd.conf if you're using an older version of
Apache or for some other reason still have the 3 config file method, but it
doesn't really matter which of the 3 it goes into.

> Of course capitalization would need to be resolved and fixed to figure
> out which they want in the case of TjBelL.DHs.OrG and such...

DNS is case-insensitive.

-- 
Jeremy Blosser   |   jblosser at firinn.org   |   http://jblosser.firinn.org/
-----------------+-------------------------+------------------------------
"If Microsoft can change and compete on quality, I've won." -- L. Torvalds
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 366 bytes
Desc: not available
Url : http://ntlug.org/pipermail/discuss/attachments/20000120/3dcaff24/attachment.bin


More information about the Discuss mailing list