CPSCI 107: Applications, Implications, and Issues
Lab 2
January 25, 2006
Preliminaries
Before doing anything on warp, we're
going to learn some HTML
and discuss some aspects of setting up a website on a Linux system
with an Apache web server. When we're done, you should know:
- what a URLis
- how to read a URL
- what a protocol is, and the most common protocol used on the World Wide Web
- what the Domain Name System is, and how to read a server name specified in DNS
- what an HTML tag (and its corresponding end tag) look like
- the structure of an HTML document
- what the following tags indicate (I'll assume you know the
appropriate end tag for each):
- <html>
- <head>
- <body>
- <title>
- <h1>
- <h2> through <h6>
- <p>
- <a>
- <ol>
- <ul>
- <li>
- <address>
- how comments are written in HTML and what they do
Your Website
We'll go through the steps of setting up your website on
warp together. Look over
this list after class and make sure you know how to do each
of these tasks, and why we did them.
- Set the permissions on your home directory so that anyone can execute it.
- Create a directory named public_html in your home directory.
- Set the permissions on this directory so that anyone can execute it.
- Create a file in this directory named index.html (the contents of this file are specified below).
- Set the permissions on this file so that anyone can read it.
Your First Homepage
Now we'll use emacs to use it to create the file index.html.
(If you have trouble using emacs, re-read section 10
in the Basic UNIX Tutorial as soon as possible.)
Here's what we'll put in this file, which will be your homepage:
- your name should appear in the title
- your name should also appear as a first-level heading at the top of the page
- the page should contain an unordered list of one item:
- the text ‘CPSCI 107 class homepage’ (without the quotation marks)
- your page should have an address section indicating your name
and the date the page was modified
After we've done all that, we'll take a look at your new homepage using a web browser.
Proofread your page in the browser (look for anything weird: missing text that you
know you typed in, everything appearing in a large font, occasional extraneous
greater-than or less-than symbols, your name not appearing in the title bar of
the browser, etc.). If anything's incorrect, go back to your emacs window and
look for what might cause the problem; if you can't figure it out, call me over
for help.
Hyperlinks
Now we're going to take a brief timeout to discuss hyperlinks.
After we're done, edit your homepage so that the text of the list item in the
unordered list is now a hyperlink that will take the reader to the class homepage.
Open your edited homepage in a browser, proofread your work, and test the hyperlink.
If you have any problems, call me over for help.
Review
We'll have a quiz on Friday. Make sure you understand all of the following points
from today's class.
- what the access permissions on a directory must be for it to be accessible on the web
- what the access permissions on parent directories must be in order for a directory to be accessible on the web
- what the access permissions on a file must be for it to be accessible on the web
- the URL of your homepage on warp (http://warp.cs.hamilton.edu/~username/)
- what the role of your public_html directory is
- what the role of an index.html file is
- what happens when the access permissions in a subdirectory of public_html
are set so that it's both world-executable and world-readable
Note: The points listed above are specific to a Linux system with an Apache web server.
They carry over, however, to other operating systems and other web servers. (You
face these issues on any system; the solutions will be similar, but will differ in
their details.)
[ Return to the CPSCI 107 homepage ]
Brian J. Rosmaita <contact me>
This page was last modified Wednesday, 25 January 2006 at 14:56 UTC.