| CS290I - Scalable Internet Services and Systems | |
|
Thorsten von Eicken - UCSB - Spring 2001 |
|
| You will have to run your web
server on one of the course machines other than bugatti: bentley,
daimler, or lotus (bugatti will continue to run the database,
which you need to use remotely). To spread the load evenly, please use the machines
according to the table at the right as much as possible.
Note that the home directories on these machines are on the local hard drive and not on the regular NFS file server. This is because we will disable NFS for project 4 so that we will not get performance interferences. You must install the web server software locally or it will all cease to work at that point. You may load the servlets from your NFS home directory for now to make editing easier, but you will have to copy them to the local drive for project 4. |
|
|||||||||||||||||||
When you run your own copy of apache, you will need to use a port other than the customary port 80. Use port 80XX according to the above table. You also need a port for the servlet engine: this is used for the communication between apache and the servlet engine. Use port 90XX for that.
# Create the "static Web" directory and servlets
dir
cd
mkdir www servlets
# Untar the skeleton of apache configuration
tar xvf /cs290i/Apache.UserConf.tar
# Edit apache/apachectl
Change the MYROOT variable
# Edit httpd.conf (search for CS290I_CHANGEME):
# Edit jserv.conf (search for CS290I_CHANGEME):
# Edit jserv.properties (search for CS290I_CHANGEME):
# Edit zone.properties (search for CS290I_CHANGEME):
# Test your set-up
# Copy the examples in /cs290i/apache/servlets/
to your servlets directory (the one defined in repository)
cp /cs290i/apache/servlets/*.class /home/USER/servlets/
# Start the apache server
apache/apachectl start
# Check the error log
cat apache/logs/error_log
# Copy any html file into your document root. Try if
static pages work.
echo "Hi MOM!" >/home/USER/www/my_file.html
point your browser at http://MACHINE:PORT/myfile.html
# Try the Hello and TestGraph servlets (the latter will take a while the first
time)
http://MACHINE:PORT/servlets/Hello
http://MACHINE:PORT/servlets/TestGraph
# Try the WebMacro HelloWorld servlet
http://MACHINE:PORT/servlets/HelloWorld