Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.Hawaii.Edu!news.lava.net!news-w.ans.net!newsfeeds.ans.net!feeder.chicago.cic.net!news.inc.net!uwm.edu!cs.utexas.edu!howland.erols.net!vixen.cso.uiuc.edu!ais.net!news.nol.net!gryphon.phoenix.net!not-for-mail From: "Greg" <gking@this.aint.my.address.com> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Apache and virutal hosting ?? HELP Date: 21 Mar 1997 21:19:23 GMT Organization: Balls.Org Lines: 92 Message-ID: <01bc363d$360910c0$c2e478cc@gking.balls.org> References: <01bc34ac$458821e0$664c1bcc@tony.gcr1.com> Reply-To: "Greg" <gking@neither.is.this.com> NNTP-Posting-Host: gking.capitaljustice.com X-Newsreader: Microsoft Internet News 4.70.1155 Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37490 If you are running multiple IPS, you first need to alias an ip to you network interface on the box ifconfig de0 alias xxx.xxx.xxx.xxx netmask 0x???????? where de0 is the device for you network card and 0x???????? is the netmask for your network Next, manually enter the line to make it active immediately Next , add the forward and reverse DNS for the virtual domain for that domains Zone and the ip address for the www host record Next, I would add the entry into the hosts file on the box : xxx.xxx.xxx.xxx www.dom.ain (this really isn't necessary but if you begin handling alot it makes it easier to track) Now in the httpd.conf file (default is /usr/local/www/conf/httpd.conf) you will need a virtual host entry (its akin to html) here is a simple one : <VirtualHost www.dom.ain> ServerAdmin user@dom.ain DocumentRoot /home/user/html (depends on how system is setup) ServerName www.dom.ain ErrorLog /home/user/error_log (depends on how system is setup. Also note to not store these in the users html dir) TransferLog /home/user/access_log (see above doc) </VirtualHost> ------------------------------------------------------- Using the ServerAlias for non-ip virtual hosts (does not work with some browsers Netmanage is a good example) In the DNS zone record for the virtual domain, point it to the ip address of your webserver (better yet CNAME it) www.dom.ain IN CNAME yourwebbox.xxx Add the entry to the hosts file for easier record keeping In the httpd.conf file do this instead : <VirtualHost ip of your box> SeverAdmin user@dom.ain DocumentRoot /home/user/html (depends on how system is setup) ServerAlias name of your box www.dom.ain Servername www.dom.ain ErrorLog /home/user/error_log (depends on how system is setup. Also note to not store these in the users html dir) TransferLog /home/user/access_log (see above doc) </VirtualHost> Thats the rundown of it anyway. If i forgot something please correct me someone, I have yet to sleep in 39 1/2 hours... Once you get the hang of it you might want to script a manager in perl (thats what I did) I manage our International DNS Web and mail systems among other stuff and manually entering all that got tired quick so I "corrected the issue". Tony <tony@gcr1.com> wrote in article <01bc34ac$458821e0$664c1bcc@tony.gcr1.com>... > I'm running Apache 1.1.1 and it looks like there are 6 instances of it set > up ? > any how .. I'm trying to find good docs or info on adding 3 or 4 more > virtual sites > to my BSD box .. I've looked at some of the info on Apache's website but > none > of it directly applies to BSD ... How do I either use one IP and have > multiple websites > or if needed run multiple IPs on my system to have the sites accessed > ?????? > > HELP > -- > > > > >>>> N5GPI WWW SITE - HTTP://WWW.GCR1.COM/N5GPI <<<< > Best Experienced with Microsoft Internet Explorer 2+ > >