COP3832, Assignment 4
Due 11/26 at the start of class.
Hand in and upload a copy of access.conf. Make all changes in the access.conf
file, not in srm.conf. Be sure your user name and port is on the paper.
There is an extra credit portion that is worth 2 points. There is only extra
credit if you implement all of the extra credit parts. Extra credit must
be done on time.
You are to configure your server as follows
-
Create three subdirectories of COP3832/data
-
Add a .3832access file to the hw4 directory. Limit access to
my ip addresses and the address you are working from. Create it as you have
in the past.
-
Add a .3832access file to the links directory. Limit access
to my ip addresses and the address you are working from. Create it as you
have in the past.
-
In the include directory, create two files that can be included as
HTML in other documents. These should not be complete HTML pages, just fragments
of HTML code
-
header.html - This will contain a header for your web site. Include
your name.
-
footer.html - This will include a footer for your web site. Include
a list of links to the other directories on your server for this homework.
-
In the hw4 directory, create two files named page1.shtml and
page2.shtml.
-
Create some individual content for each page, and include header.html
and footer.html using server side include commands.
-
Include the date that each file was last modified. Change the format of the
date for each file using a server side include file.
-
Copy the file to the links directory
cp page1.shtml ../links
cp page2.shtml ../links
-
(Only for extra credit) In the hw4 directory, create a file named
page.handler.
-
Create some content for the page.
-
Do not include any SSI commands.
-
Do not include the HTML code from either header.html nor
footer.html.
-
Copy the file to the links directory.
-
Copy one of your cgi scripts that works from the cgi-bin
directory into the hw4 directory. Also copy it to the links
directory.
-
Create a link in the hw4 directory to your errors directory,
replace dlette07 with your user name. Do not change
tdowne01.
ln -s /aul/homes/dlette07/COP3832/server/errors/ ownlink
Create a link in the hw4 directory to my student personal directory
ln -s /aul/homes/tdowne01/COP3832/personal/ otherlink
-
Change to the links directory and create the same two links again,
replace delette07 with your user name. Do not change
tdowne01.
cd ../links
ln -s /aul/homes/dlette07/COP3832/server/errors/ ownlink
ln -s /aul/homes/tdowne01/COP3832/personal/ otherlink
-
Create the following Aliases in srm.conf
-
An alias named /ssi to your hw4 directory
-
An alias named /simple to your hw4 directory
-
An alias named /all to your hw4 directory
-
An alias named /cgi to your hw4 directory
-
An alias named /none to your hw4 directory
-
(Only for extra credit) An alias named /handler to your hw4 directory
-
An alias named /errors to your COP3832/server/errors directory
-
In access.conf, use the Location directive to allow the following features
in certain directories. Make server side includes for .shtml files and cgi
scripting for .cgi files available for the entire document root, but only
enable them as described below. Be sure to turn off symbolic links in the
document root, so that symbolic links only work in the link directory.
-
ssi: allow fancy indexing and server side includes
-
all: allow fancy indexing and all options
-
simple: allow simple indexing
-
cgi: allow fancy indexing and execution of CGI scripts
-
none: allow no options, not even indexes
-
(Only for extra credit) handler: allow fancy indexing and allow files with
the extension handler to have the text from header.html inserted
into the file after the <BODY> tag, and have the text from
footer.html inserted before the </BODY> tage. You may assume
that the <BODY> tag is on a line by itself, and that the
</BODY> tag is on a line by itself.
-
The <Location> directive ignores any directives that effect symbolic
links (since they are already a type of symbolic link). Once symbolic links
are on for a physical directory, they cannot be turned off in a
<Location> directive.
-
In access.conf, use the Directory directive to do the following for the
links directory
-
allow fancy indexing
-
follow symbolic links if the owners match
-
change the icon for .shtml files to a different one of your choice from the
/icons directory (/depot/http/icons/)
-
change the icon for .cgi files to a different one of your choice from the
/icons directory (/depot/http/icons/)
-
change the icon for directories to a different one of your choice from the
/icons directory (/depot/http/icons/)
-
change the icon for the parent directory to a different one of your choice
from the /icons directory (/depot/http/icons/)
-
In the errors directory, create html files for the following errors. Be creative,
but the files should load quickly!
-
403 Forbidden
-
404 Not Found
-
500 Internal Server Error
-
Change the appropriate configuration file so that the above error messages
are displayed for the appropriate errors.
-
Create a 3832.html file in your personal directory that can be viewed by
other web servers. Try it out on my student server:
mongoose.aul.fiu.edu:65432.
Do not allow cgi scripting, nor the exec command from server side includes
in user directories.
-
Create an 3832.html file in your data directory that will have the following
-
A link to a file that will create a 403 error. This is not
a link to the file in the errors directory, but a link to a file in
your data directory that will generate a 403 error.
-
A link to a file that will create a 404 error. This is not
a link to the file in the errors directory, but a link to a file in
your data directory that will generate a 404 error.
-
A link to a file that will create a 500 error. This is not
a link to the file in the errors directory, but a link to a file in
your data directory that will generate a 500 error.
-
A link to /simple
-
A link to /ssi
-
A link to /cgi
-
A link to /all
-
A link to /none
-
(Only for extra credit) A link to /handler
-
A link to /links
-
A link to the personal page for ~tdowne01
Use the 3832.html to investigate what happens when you try to open each file
in each directory. Notice where ssi commands work, cgi commands work, and
links work. Notice how the icons change in the /links directory. Notice when
fancyindexing works. Have fun.
Check my student server for an example of what the assignment looks like:
mongoose.aul.fiu.edu:65432