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.
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.
group
under cgs4854
.
cgs4854.html
in the group
folder.
srm.conf
file in the conf
folder of
Apache.
UserDir
directive to
cgs4854/group
.cgs4854.html
as the first option in the
DirectoryIndex
directive.~tdowne99
path on your server. If you see a Wrong
Page heading, then you have done something wrong.~downeyt
path on your server.~username
path on your server. Replace username
with your user name. You should see your page.~username
path for anyone else's id that you know
in the class.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.
/icons/
on your server. Be sure to include the
trailing /
.
icon_sheet
image. It is one image that contains
thumbnails of each image in the folder.srm.conf
file.
AddIconByType
directives for
html
, png
and txt
files. You
will need to determine the correct mime type for these file extensions.
(In the conf
folder of your server, open the
mime.types
file and look for the mime type associated with
each extension.)srm.conf
file, change the icon for the
appropriate AddIconByType
for each mime type.AddIcon
directive that is associated with the
parent directory. (Hint: you need to know the shorthand symbol in a
path that means 'parent directory').~tdowne99/tutorial
path on your server and you
should see the icons that you selected. (I chose the ones listed below. You
can choose different ones.)
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.
docRoot
named
errorPages
.
404.html
for 404 errors.
Be sure that 404 appears in the title and in the page.403.html
for 403 errors.
Be sure that 403 appears in the title and in the page.srm.conf
file.
ErrorDocument
directive in the file.ErrorDocument
statement for 403
errors./~tdowne99/
and follow the links to a file
that does not exist and a file that cannot be accessed.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.
To hand in the tutorial, zip the docRoot, serverRoot
and
group
folders and upload them.
rm ~/username.zip
cgs4854/serverRoot
folder.
zip -r username ~/cgs4854/serverRoot -x \*.jar \*.zip
\*.war
Replacing username with your user name. This will create a file named username.zip.
cgs4854/docRoot
folder.
zip -r username ~/cgs4854/docRoot -x \*.jar \*.zip
\*.war
Replacing username with your user name. This will add to username.zip file above.
cgs4854/group
folder.
zip -r username ~/cgs4854/group -x \*.jar \*.zip \*.war
Replacing username with your user name. This will add to username.zip file above.
~downeyt/cs/public/webftp/webftp.pl