Connecting to our server
For this course, your web space is served by cs.utm.utoronto.ca. Your home directory is remotely
mounted both by cs.utm.utoronto.ca as well as on our lab machines. This means that, from any machine
that accesses your home directory, you can edit your webpages. To be specific, you can edit
your webpage from any of our lab machines (for example).
ssh UTORID@dh2020pcXX.utm.utoronto.ca
Web setup in the lab
- Prepare your environment. On a lab machine...
cd ~
chmod 711 ~
mkdir www
chmod 711 www
cd www
so your webspace is
~/www
.
- Editing documents on the server: You have a few options. One option is to edit the files
locally (ie using Notepad++) and then upload them (ie scp) to your home directory (
~/www
).
Other options include using a unix editor directly on one of the lab machines.
Options here include vi, vim, nano, emacs.
- Creating your first webpage
# create file index.html with contents ...
Hello World
I am ID and this is my first webpage.
# and get it into the server, in ~/www
# check that the permissions are correctly setup
ls -al index.html
# -rw-r--r-- 1 arnold ssl-cert 44 Jan 9 00:35 index.html
# if they are not set correctly, fix the files permissions by ...
chmod 644 index.html
# now view this in a browser at
# http://cs.utm.utoronto.ca/~UTORID/index.html
# View your neighbours web page as well.
# Go to http://validator.w3.org/ and validate your web page.
-
.... is an element
consisting of start tag
and end tag
-
Make sure you set your new documents permissions properly.