Here is what we'll be doing in this section:
When you unpack the Nomad software it will create the directory httpd. This directory contains sub-directories which resemble the normal root directory structure of your web server. In particular it contains the directories for Nomad web pages (httpd/html/nomad), and Nomad scripts (httpd/cgi-bin). You simply have to configure your web server files to point to these two locations as outlined below.
Since Nomad will be accummulating some large image files, it is wise to place it in a location with lots of disk space. In this example we'll use a common place for custom software on UNIX systems, the /usr/local directory. In particular if we were to create a directory for Nomad there (/usr/local/nomad) and unpack the software there, the final path would be: /usr/local/nomad/httpd.
To create the directory and unpack nomad issue the following comands:
mkdir /usr/local/nomad (you may want to chown this dir to a regular user)
mv nomad.tar.gz /usr/local/nomad/
cd /usr/local/nomad
tar -xzvf nomad.tar.gz
There are two files for your web server that you need to configure (assuming the Apache web server common on most Linux systems), called access.conf and srm.conf. Just looking them over you'd probably be able to figure out what to change, but here are the particulars:
<Directory /home/httpd/cgi-bin> AllowOverride None Options ExecCGI </Directory> #add nomad directory <Directory /usr/local/nomad/httpd/cgi-bin> AllowOverride None Options ExecCGI </Directory> |
#alias for Nomad "spacer" directory Alias /db/nomad /usr/local/nomad/httpd/html/nomad Alias /db/cgi-bin /usr/local/nomad/httpd/cgi-bin |
-------------------------
# ScriptAlias: This controls which directories contain server scripts. # Format: ScriptAlias fakename realname ScriptAlias /cgi-bin/ /home/httpd/cgi-bin/ #add ScriptAlias for Nomad ScriptAlias /db/cgi-bin/ /home/seidel/httpd/cgi-bin/ |
Optional: If you want to be able to call Nomad with a simple URL such as http://www.yourserver.edu/Nomad you can use the Redirect option in srm.conf as follows. Look for the section on Redirects and add the following lines:
# Redirect allows you to tell clients about documents which used to exist in # your server's namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Format: Redirect fakename url # add Redirect options for Nomad Redirect /Nomad http://www.yourserver.edu/db/nomad/ #allow people to forget the capital? Redirect /nomad http://www.yourserver.edu/db/nomad/
kill -1 `cat /var/run/httpd.pid ` |
The -1 option for kill causes a program to stop and re-start. Every process on a UNIX system has a process ID (aka PID). The process ID of the web server is stored in a file located in /var/run/httpd.pid. The command above is a fancy way of using the "cat" command to list the contents of the httpd.pid file and feed the result to the kill command. Another way of doing this would simply be to look inside the httpd.pid file (i.e. using "more"), and then type the number after the kill command.
One way to check that the web server started up ok is to look at the end of the error_log file kept by the server. Try:
Tail /etc/httpd/logs/error_log
* Another solution to this problem would be to modify many of the dozens of Nomad scripts, but this would get unwieldy. It is still possible to call Nomad with a simple URL such as http://www.yourserver.edu/nomad by simply configuring that URL for redirect to the actual URL of your choice. This is also done in srm.conf using the redirect option.