Networking laboratory
Apache web server configuration lab
Due: Friday, September 12
Points: 20
Description. In this laboratory you will be configuring the apache web service so that
your server can provide web pages to your client (and the rest of the world). Apache's configuration
files are in /etc/httpd and the data files are in /var/www. The document root directory for
apache is /var/www/html (this can be changed by a setting in the configuration file). If your system does
not have either of the directories that means it was not installed when you installed the linux
OS. You will first need to copy the appropriate rpm file(s) (packages) from the install
CDs and then install the apache service.
Resources. You will likely want to take a look at these resources as you complete the tasks
given and answer the questions.
Tasks and Questions. Complete the tasks given below and answer any questions given. Your answers should be word processed.
Your configuration files will be inspected and your station tested to verify that apache was configured as requested.
- Verify that the service is using port 80 and that the name of the server is StationXServer.cscentral.edu then
start the service and verify that your client can access the web server and retrieve a web page. NOTE: If DNS is
not running you will need to use the ip address of the server, not its name!
- When you start the server, how many httpd processes are running? (hint - us the ps command). Is this
something that you have control over in the configuration file? If so how do you set the number of httpd
processes that are initially started?
- Create a sub-directory under the document root directory and set this directory so that the only machine that
can read pages from this directory is your client machine (restrict pages by machine address).
- Create a sub-directory under the document root directory and set this directory so that only users who have
an account on the linux machine can access the pages in the directory (restrict pages by user name).
- Configure the linux server to allow each user to have a directory named myhtml under their home directory which has pages that the
server can provide. We are allowing a directory that is not under the document root directory to be accessed now.
- What is the KeepAlive directive in the configuration file used for?
- What is the access log file used for? Where is it stored?
Notes. Some information to keep in mind:
- We do not have DNS working yet so you can't use the names of the machines. You have to use the
IP address of the server when requesting a page (http://10.20.X.100/somepage.html).
- You will need to create the web pages and directories for this lab - remember where the document root directory is!
- To test the restriction by ip address, open up a browser on the server and
try to read the page from the server.