Jim Warwick wrote:
> 
> I sent a note out yesterday and didn't get any response. But after looking
> at it, it may have been a little confusing. Basically, my question is
> this..... I am trying to do virtual hosting. I have one IP address. If I
> understand it correctly, I have to setup IP Aliasing in order to virtual
> host. Is that the case? If so, can I use the none routable addresses for
> that (i.e. 192.168.0.X)? The way I have it set in my WinDoze 2k machine,is
> with all virt. hosts have the same ip address and each virt host is picked
> up by the host header in the IP packet. Where do I go from here? I would
> appreciate any and ALL help possible.
> 

Jim,

If what you want is name based hosting for websites, that is daemon
specific 
and Apache does support it.  In httpd.conf remove any bind <IP>
directives 
and any other indication of a "main" server.  Then add the following
(assumes 
your IP is 100.100.100.5):

NameVirtualHost 100.100.100.5

<VirtualHost 100.100.100.5>
   ServerName   your.1stdomain.com
   ServerAlias  alternate.host.name # (Optional)
   ServerAdmin  [EMAIL PROTECTED]
   DocumentRoot /home/httpd/html
</VirtualHost>

<VirtualHost 100.100.100.5>
   ServerName   your.2nddomain.com
   ServerAdmin  [EMAIL PROTECTED]
   DocumentRoot /home/httpd/html
</VirtualHost>


See http://httpd.apache.org/docs/vhosts/name-based.html for full
details.  
And this function of Apache, AFAIK, does not require kernel level IP 
Aliasing support as name based hosting is handled by the daemon
receiving 
the request.  The abovce URL also includes some sample config that allow 
for mass virtualhosting with minimal config such as:

http://<username>.users.yourdomain.com/
  With a docroot of /home/<username>/public_html
  
Add a DNS 'A' entry in you domains zone file like:
  *.users   IN   A   100.100.100.5
And you have "instant" stylized URLs, just add users.

Enjoy,
 
     Woody ([EMAIL PROTECTED])

---------------------------------------------------------------
Gatewood Green         Web Developer
http://www.linux.org/  The first stop for Linux info on the Net
Email:                 [EMAIL PROTECTED]
---------------------------------------------------------------
All opinions expressed by me are my own and not necessarily
endorsed by Linux Online, Inc. or Linux Headquarters, Inc.

Reply via email to