UNIX Web Server Set Up
also called
Lab Submission Cheat Sheet
How to Get Started

  1. Once you have the account here (Local students see here , distance students see here ) make a web page on it:
    
    (1) log in (use PuTTy to connect from your home machine --- Mac users can do this from their terminal application)
    
    (2) do this command:     websetup -c 
       (only do this one time)
    This will make a directory public_html and in it will be a file called index.html. This is your first homepage. Go to a browser and go to the page and you will see your homepage. If you have problems see this page

    So that you are set up for this class, do the following to see what this index.html file that was created for you looks like on UNIX. You can either be in a putty/ssh session OR you can use WinSCP to give UNIX commands

    ls is the "list" command in UNIX, it lists all the files in a directory (same as MS- DOS dir )
    more is a command that lets you see what is in a file (same as MS-DOS type)
        In WinSCP, you can see the "listing" of files for the local and remote machines in the windows; the best way to see what is in the file is to right click on the file and choose "Edit".

    Ok, you want to make your own personal index.html for this class so let's move (mv) that one somewhere else (moving it gives the original file the new name specified).

    This is the same as on WinSCP if you simply right click on the index.html file and choose "Rename"

  2. You should make a new "top-level" file called index.html for people to navigate your site.
    So, now, in whatever environment/editor you are familiar with (the easiest for new students is WinSCP and its editor), make a new file called index.html
    It should at least have a link to the course (and look something like this one: Here is html code)
              (on Firefox you see html, on IE it creates the web page even though this is a .txt file...so, on IE, look at Page| View Source to see the html).
    If you want to later add additional pictures (and other classes) to your homepage (homepage is the index.html that is in the public_html directory), number 7 might help - but do this later.

  3. In the public_html directory, make another directory (mkdir command) for the particular class (say csci111), and then go into that directory (cd - change directory)

      mkdir csci111

      cd csci111

    You cannot leave spaces in directory or file names in UNIX. If you do, it thinks each word is telling it something different to do.

  4. Again, in whatever environment/editor you are familiar with, make a new index file for this csci111 directory called index.html that contains this (again - on IE look at its Page| View Source to see the html)
    (This example is for a course with 4 labs...you can see the pattern for more or less labs.

    This page should be in your csci111 (or appropriate class) directory with the name index.html

  5. Back at the UNIX prompt (or in WinSCP on the UNIX side), make directories to fit these links to organize your materials; do the following in the course (csci111) directory:

    1. mkdir lab1

    2. mkdir lab2

    3. mkdir lab3

    4. mkdir lab4

    5. ... (if more labs, make more directories)

    6. chmod 755 * (this gives us all permission to get into the directories)


    If you are in the campus CSCI 111, you are done setting up on the web for now but you can go to this page if you want to see how to put your java labs on the web.

    If you are in the distance CSCI 111 go back to lab1.


  6. In each of these directories you will want to put your files for that lab (when it is ready to be graded). For each of these directories then, you will need a specific lab.html file that looks something like this . With, of course, the proper information (and probably different file names) in the html reference link slots. Make sure that all files in the directories have read permission

    If you have a src (source) directory, the directory needs to have executable permissions

    Before submitting the program YOU should check to see if all permissions are set properly so that someone can see if from the web (i.e, that means try it!)

  7. When the lab is finished, submit it on the proper registration page. For more explicit information on what is in each of these pages and how to submit, see http://www.ecst.csuchico.edu/~amk/foo/design.html and http://www.ecst.csuchico.edu/~amk/foo/csci151/tips.html

  8. Now that you have the directory set up for your class(es), if you want to use the "top" level for your own personal "homepage" - located at
    http://www.ecst.csuchico.edu/~yourUserName
    you should go to just inside your public_html directory and edit (or make) an index.html file.

    To put pictures inside a web page you insert the command

    < img src="nameOfFile.gif" >
    with your .gif file being in the public_html directory too. The duke power gif is this

    In general, if you want to see how someone did their webpage, when you are on the particular page on a browser, under the menu item "view", choose "page source" or "source" and you can see how they did the current page.