CPSCI 105: Explorations in Computer Science
Lab 3
January 30, 2007
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.
At the end of lab today, review the topics listed below and
make sure that you understand what they mean (or how to do them).
The Web
- know what a URL is
- 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
Basic HTML
- know what an HTML tag (and its corresponding end tag) look like
- know 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.
Review
We'll have a quiz on Thursday. In addition to the points listed above for "The Web"
and "Basic HTML", make sure you understand:
- 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
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 105-01 homepage ]
Brian J. Rosmaita <contact me>
This page was last modified Wednesday, 24 January 2007 at 19:48 UTC.