Installing Nomad as the root directory of your web server
Linux boxes come with pre-defined locations for web server files to exist. If you want to install NOMAD at the very base of your web server so that when people type in the address of your machine (i.e. http://www.mycoolwebserver.edu/ ) Nomad is what they will see, then follow the instructions below for modifying your server configuration files to point to where you place NOMAD on your system.
Here is what you'll be doing:
- unpack Nomad in the target directory
- modify web server configuration files
- re-start the web server
unpack Nomad in the target directory
- Move the Nomad tarball to /var and unpack it:
gunzip Nomad.tar.gz
tar -xvf Nomad.tar
This will create the directory httpd which contains all the Nomad goodies and
the new web directory structure.
Modify web server configuration files
The apache web server is configured using files typically found in /etc/httpd/conf (if you're unsure of the location of a file on your system try using the locate command to find it. i.e. type: locate access.conf). In particular you need to modify two files to point the web server to the new location of the html and script directories for Nomad.
modify access.conf
- The file access.conf is where you define where you want the root of your web server to be. Find the following line in /etc/httpd/conf/access.conf:
# This should be changed to whatever you set DocumentRoot to.
<Directory /home/httpd/html>
and change it to /var/httpd/html
# This should be changed to whatever you set DocumentRoot to.
<Directory /var/httpd/html>
Next we set up options for the directory that holds the Nomad scripts.
Find the lines below:
<Directory /home/httpd/cgi-bin>
AllowOverride None
Options ExecCGI
</Directory> |
and change /home/httpd/cgi-bin to /var/httpd/cgi-bin
<Directory /var/httpd/cgi-bin>
AllowOverride None
Options ExecCGI
</Directory> |
That's it for access.conf. We have one more file to modify.
modify srm.conf to reflect script location
-
In the file srm.conf, find the line that says ScriptAlias and change the directory to reflect the location of the Nomad cgi-bin directory.
# ScriptAlias: This controls which directories contain server scripts.
# Format: ScriptAlias fakename realname
ScriptAlias /cgi-bin/ /var/httpd/cgi-bin/
|
Re-start the web server
Now that the web server configuration has changed we need to re-start the server for the new options to take effect. One method of doing this is to use the UNIX kill command to tell the webserver process to re-start itself and re-read its start up files.
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 (the section in back ticks gets evaluated first). 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.
You can check to see that the web srever re-started correctly by looking at the httpd error_log.
tail /var/log/httpd/error_log
|
Back to Nomad installation.