[NTLUG:Discuss] Virtual Host in Apache (LONG)

MadHat madhat at unspecific.com
Thu Aug 26 12:42:31 CDT 1999


MadHat wrote:
> 
> Keith From wrote:
> > >
> 
> You may want to look at
> http://www.apache.org/docs/vhosts/index.html
> 
> I will try to answer what I remember.
> 
> >
> > OK, this brings up another question about the "NameVirtualHost
> > 209.223.22.92:80"
> >
> > If I were to have 5 sites going under Apache, would i need to do
> > something like this????
> >
> > NameVirtualHost 209.223.22.92:80
> > NameVirtualHost 209.223.22.93:80
> > NameVirtualHost 209.223.22.94:80
> > NameVirtualHost 209.223.22.95:80
> > NameVirtualHost 209.223.22.96:80
> >
> 
> I haven't set it up this way before, with multiple NameVirtualHost
> entries, but I think it will complain.  If you are wanting to use more
> than 1 IP for multiple sets of virtual hosts, you may have to run
> ddifferent instances of Apache.  I know you have have 1 set of virtual
> hosts and the use IPs for other sites on the same apache, but not
> multiple sets of VHs.  I didn't see anything about it in the docs.
> 

damn I can't type a complete sentence...

OK, if you have 5 IPs and you want to have 5 domains, put them on
seperate IPs, if you have 1 IP and 5 domains, use the NameVirtualHost
and use the 1 IP for all 5.  If you have say 2 IPs and you want 3
domains on one IP and 2 on the other IP, you would have to use more than
one instance of httpd (apache).  But if you just have 3 IPs and 5
domains, you can have 1 domain point to the first IP, the next domain
point to the next IP and have the last 3 domains point to the last IP
(and use the NameVirtualHost on that IP) without running more than one
instance of apache.

Does that make sence? Or better yet, does that answer the question/solve
the problem?

-- 
MadHat




More information about the Discuss mailing list