CGS4854 Tutorial 6

Due Friday, 6/24.

I have jury dity on 6/20, so there will be no class. To make up for the lost class time, I am assigning an extra tutorial. It will count as extra credit towards your grade.

This tutorial is an Apache tutorial. There are no servlets or JSPs.

Create the user directory

The user directory is the public HTML folder that every student can have on your server. When a request for ~username is made on your server, then your server will look for ~username/userDir. If it has the correct permissions, then it can be accessed. If there is a default file, then it will be displayed. We will define the userDir as cgs4854/group.

To access a user dir from your Apache server, use the URL

http://studentXX.cgs4854.cs.fiu.edu:99999/~some-username

Replace XX with your host number, 9999 with your port and some-username with any valid user name on ocelot, like yours (~your-usename) or one of mine (~tdowne99 or ~downeyt).

The directory index is the list of default file names that can be displayed. The server will take the first one that it finds.

This part of the tutorial redefines the user dir as cgs4854/group and sets cgs4854.html as the first option in the directory index list. It is essential that the file and folder have the correct group permission.

Change the default icons

In the srm.conf file, there are directives that control the icons that display in directory listings.

To see a directory listing, access ~tdowne99/tutorial from your Apache server. You will see several icons for different files.

You will now change those icons to something else.

Shows new icons

Change the error messages

Web sites display an error message when a page cannot be found. They also display a message when a user does not have permission to access a page. An individual message can be displayed for any of the responses from the server that indicate there is an error.

We will create new error messages for 403 and 404 errors. You can follow links from ~tdowne99/ to see the new messages that you create.

Modify index.html in docRoot

Add relative hypertext links to the docRoot/index.html file to ~tdowne99 and another link to ~your-user-name. Both of these links must be relative to your Apache server.

Submitting Homework

To hand in the tutorial, zip the docRoot, serverRoot and group folders and upload them.