back to apache homework main page
This document explains how to run a customized Apache on Solaris machines in UNIX-Lab.
To setup Apache
On the Solaris platform, Apache has already been installed, so you don't need to do so again. However, since you don't have privilege to modify the configuration files for Apache that are stored in /etc/apache/ and manage HTML files in /var/apache/htdocs/, you have to set up your own copy of those files in your home directory. A good news is that I have prepared a tar ball including all the files you needed. More specifically,
1. Download apache_cslab.tar.gz and uncompress it in your home directory. After that, you should have the following tree structure:
2. Replace every ocurrence of /home/cslab/phd/jniu/ with your own home directory's absolute path.
$HOME\
|-apache
|- conf
|- htdocs
|- icons
|- logs
|- run
|-...
.
.
.
To start/stop Apache
To run Apache, execute /usr/apache/bin/httpd -f $HOME/apache/conf/httpd.conf. If anything goes normally, you will have the following in your console:
To stop the running Apache server, execute kill -TERM `cat $HOME/apache/run/httpd.pid`. Note that the small thing in the command is `(on the left of '1' key) rather than '(single quote).(Don't worry about the alert information.)
bash-2.03$ /usr/apache/bin/httpd -f $HOME/apache/conf/httpd.conf
[Fri Mar 5 00:30:19 2004] [alert] httpd: Could not determine the server's fully qualified domain name, using 134.74.148.18 for ServerName
Other issues
The Apache listens on port 8080, which you may change to another one by modifying the configuration file if you are told it has been already occupied.
If there is something wrong while you launch Apache, check with $HOME/apache/logs/error_log, where you probably can find the reason.
You can visit the running Apache server with http://servername:8080/
in any browser, where servername could be the IP address
or domain name of the server on which Apache is running