CS 111B Lecture Notes - HTML Basics and Applets - Section 2.8

HTML Basics

Setting up your CCSF website on hills

Your hills account can be used as a web server. You just need to set up your directories and permissions correctly, and then your web page will be live to the world! Just type the following commands and follow the directions to make it work.
  1. mkdir public_html - You must create a directory called "public_html". The contents of that directory will be your public web site. This directory must be in your home directory (the one you are in when you first login).
  2. chmod a+rx public_html - You must "change the mode" (set the permissions) so that all users can read and execute files in your public_html directory. You will have to do this same "chmod" command for each directory you create under public_html.
  3. cd public_html - Now change into this new directory to put files into it.
  4. pico index.html - Create a file called index.html and put it into this directory. This file will be the first web page your users see. Once you've written and saved this file, go on to the next step.
  5. chmod a+r index.html - Make this index file publicly readable. You will have to do this same "chmod" command for each file you want people to see as part of your web site, including class files defining an applet.
  6. Test your website by pointing your web browser to:
    http://hills.ccsf.edu/~yourname
    where "yourname" is replaced by your hills login name.
  7. If your index page doesn't come up, check to make sure you did each of the above steps, or try running the "setup" script to do it for you. Typing "setup" (without the quotes) at the UNIX prompt should set all the permissions correctly for the public_html directory and its contents.
All of the above commands can also be done with an FTP program. To change directory and file permissions using your FTP program, highlight the directory or file, and right-click. Select "Properties" or "chmod (UNIX)" from the pop-up menu. I use "a" in the chmod commands above to mean all users. To select all users in the properties/chmod window, make sure the permissions are set correctly for "Owner", "Group", and "Other" (those three groups together make up all users).

Applets (Section 2.8)

More Details on Applets

Return to CS 111B page