>From earth.com!owner-inet-access Thu Sep 7 10:44:42 1995
Sender: inet-access@earth.com
From: bc@mtiweb.com (Barry Caplin)
To: linuxisp@lightning.com, inet-access@earth.com
Subject: virtual domain web
Hi,
This is the last installment of the virtual domain stuff. Here is
what I did to get my web server going.
I know many people are using apache. Also, there is a set of patches
for an ifconfig-alias. I do not use these. I am using the SubDocRoot
patches to NCSAv1.4.1. I got this patch and the version of NCSA from
ftp://ftp.semaphore.com/pub/web/ncsa_httpd/, however I don't seem to be
able to get to that site now. There are copies of this patch floating
around, and I can email it to anyone that needs it.
[NOTE: as of 12/13/95 I changed to ncsa v1.5a. This newer version
already includes virtual host capability making most of this post
unnecesary. web to http://hoohoo.ncsa.uiuc.edu for details]
So the first step is to apply the SubDocRoot patch to the NCSAv1.4.1
source. Then, in the httpd directory, make linux. (I put all this stuff
in /usr/src/httpd_1.4.1).
The SubDocRoot info goes in the httpd/conf/srm.conf file:
# SubDocumentRoot: Here is where we specify virtual domains.
SubDocumentRoot www.virt1.com full pathname for virt1
SubDocumentRoot www.virt2.com full pathname for virt2
Wherever you put the SubDocRoot (I put it in /www/virt1), you should
create an htdocs and logs directory. I put a link from logs/access_log
to /www/httpd/logs/access_log.www.virt1.com (which is now created by
httpd). The rest of the httpd setup goes as normal. Check
http://hoohoo.ncsa.uiuc.edu for online docs.
Next, you need to have modules support in the kernel. When I started
this process I was still running 1.1.59 which did not have modules. So
I upgraded to 1.2.1 (where I am now). In /usr/src/linux do a make modules.
This will, among other things, create a file dummy.o in drivers/net.
Now, you must rebuild the kernel WITHOUT a dummy device.
[NOTE: as of 11/13/95 I upgraded my kernel to 1.2.13. Everything still
works fine and I didn't have to do anything to change these procedures.]
These next steps can be done by hand (in fact you probably should the
first time around). I have this in my /etc/rc.d/rc.local:
# add dummy devices for virtual domains
# domain.com
/sbin/insmod -o dummyn /usr/src/linux/drivers/net/dummy.o
/sbin/ifconfig dummyn ip.ad.dr.es up
/sbin/route add ip.ad.dr.es dev dummyn
/sbin/arp -s www.virtn.com yo:ur:et:he:r_:id pub
/sbin/arp -s www.virtn.com yo:ur:et:he:r_:id pub
/sbin/arp -s www.virtn.com yo:ur:et:he:r_:id pub
/sbin/arp -s www.virtn.com yo:ur:et:he:r_:id pub
This is done for each virtual domain, n=1,... I don't know why the arp
is done 4 times but many people have recommended this and it seems that
sometimes arp needs this. I did get a newer version of arp and I don't
think this is still necesary, but it ain't broke so I ain't fixin' it :-).
Note here that you now need to assign an IP address to this (and every)
virtual domain). You will also need to register this name. In my bind
post yesterday I put a CNAME record in the zone file for www.virt1.com.
That's pretty much it. As I mentioned in my other posts, all this
info came from these lists over the last 6-8 months. For this particular
web info I'd like to give credit to: Randy Byers, Michael Dillon,
Joe Portman, and Richard Postgate.
I also have some credits for my sendmail post: Matt Zahorik, Chris
Candreva, and Scott Jennings. (I know the names because I kept hardcopy
of the original posts).
As always, I'll try to answer any questions anyone has.
Good luck!
Barry
Barry Caplin MicroWEB Technology, Inc.
bc@mtiweb.com http://www.mtiweb.com