Jason S. on Fri, 6 Aug 1999 12:00:53 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

RE: [Plug] Executing CGI Scripts outside cgi-bin


There's 2 ways to do virtual hosting. Name based and ip based. Name
based hosting means all the addresses point to the same IP and apache
sorts out the sites by the headers. This doesnt work with really old
web browsers. The ip based method is kind of wastefull. Having a 
zillion virtual ip's is silly. The example I sent you was for name based
hosting. The First parameter just tells apache what interface to look
at. Here... you can do stuff like this:


 ____________________________________________________________________________
 NameVirtualHost 10.16.232.10
 
 <VirtualHost 10.16.232.10>
 ServerName webdev.something.net
 DocumentRoot /home/htdocs/something.net
 SetEnv SERVER_URL http://webdev.something.net
 PerlPassEnv SERVER_URL
 Alias /Internal/ /home/htdocs/Internal/
 Alias /timedoc /home/htdocs/timedoc
 Alias /pr0n /home/jason/research
 Alias /doc	/usr/doc
 ScriptAlias /cgi-bin/ /home/htdocs/cgi-bin/
 ScriptAlias /sec-cgi/ /home/htdocs/sec-cgi/
 ScriptAlias /admin-cgi/ /home/htdocs/admin-cgi/
 </VirtualHost>

 <VirtualHost 10.16.232.10>
 ServerName www.foofah.com
 DocumentRoot /home/htdocs/foofah.com
 SetEnv SERVER_URL http://www.foofah.com
 PerlPassEnv SERVER_URL
 ScriptAlias /cgi-bin/ /home/htdocs/cgi-bin/
 ScriptAlias /sec-cgi/ /home/htdocs/sec-cgi/
 ScriptAlias /admin-cgi/ /home/htdocs/admin-cgi/
 </VirtualHost>

 <VirtualHost 10.16.232.10>
 ServerName www.blumfrub.com
 DocumentRoot /home/htdocs/blumfrub.com
 ServerAdmin webmaster@blumfrub.net
 SetEnv SERVER_URL http://www.blumfrub.com
 PerlPassEnv SERVER_URL
 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine
 d
 CustomLog /home/weblogs/access_reportlog combined
 </VirtualHost>

 ____________________________________________________________________________

 There's lots of options. If any of the directives are confusing, check
 out the apache docs. What you want to do is totally reasonable. 
 You just need to get familiar with what all apache can do. NOt 
 that I'm an expert, I've just done stuff like what you described.

J.

When I grow up, I wanna be more like me.
I had a clue. I didn't like it. I took it back and exchanged it for an
attitude.  

On Fri, 6 Aug 1999, Charles Stack wrote:

> My server only has two network cards...one currently set for 10.0.0.5 and
> the other as 192.168.0.2.  The former will change to our public IP when we
> go live.
> 
> I see from your example that you named it 10.16.232.10.
> 
> My questions on Virtual Hosting are these...
> 
> Do I need another network card to handle the IP for the virtual host?
> Do I need to give the virtual host and IP (as you have done) or any ol'
> name?
> 
> 
> Charles
> 
> ____________________________________________________________________________
> NameVirtualHost 10.16.232.10
> 
> <VirtualHost 10.16.232.10>
> ServerName webdev.something.net
> DocumentRoot /home/htdocs/something.net
> SetEnv SERVER_URL http://webdev.something.net
> PerlPassEnv SERVER_URL
> Alias /Internal/ /home/htdocs/Internal/
> Alias /timedoc /home/htdocs/timedoc
> Alias /pr0n /home/jason/research
> Alias /doc	/usr/doc
> ScriptAlias /cgi-bin/ /home/htdocs/cgi-bin/
> ScriptAlias /sec-cgi/ /home/htdocs/sec-cgi/
> ScriptAlias /admin-cgi/ /home/htdocs/admin-cgi/
> </VirtualHost>
> ____________________________________________________________________________
> 
> 
> _______________________________________________
> Plug maillist  -  Plug@lists.nothinbut.net
> http://lists.nothinbut.net/mail/listinfo/plug
> 


_______________________________________________
Plug maillist  -  Plug@lists.nothinbut.net
http://lists.nothinbut.net/mail/listinfo/plug