CMSC 210
Spring 2017
First Web Pages HOW TO PUBLISH

To publish your webpages:

0)
 Create a directory called  public_html  and a sub-directory called  210 .   Instructions:
  • Connect to the server via putty or ssh to connect to  cs.longwood.edu
  • At the command prompt, type:
    •   ls   (this lists the contents in your directory).
  • If you do NOT see public_html  in the listing, you need to type:
    •  mkdir public_html
  • Now, change to that directory by typing: 
    • cd public_html
  • Create the directory 210 by typing.
    • mkdir 210
  • NOTE: Much of the above can also be done via WinSCP, but I am not giving those instructions here.
1)  Use WinSCP to  publish your files.  Instructions:   (Linux users see below)
  • Open WinSCP and connect to cs.longwood.edu
  • On the right side should be a GUI showing your files on the server.
  • Go inside the public_html folder (double-click)
  • Go inside the 210 folder (double-click)
  • Now, drag Page1.html  to the window.
2)   Go to a browser and to the following URL:
  • http://cs.longwood.edu/~youruserid/210/Page1.html
Be sure to replace youruserid as appropriate.  If you do not see your pages at these URLs, then something has gone wrong.

3)  NOTE:  The above  URL is where people will go to evaluate your work.

Linux Usesr for copying files to server:

Assume your files are in a folder called "FirstHW" on your desktop.

At a terminal prompt, type the following:
  • sftp yourusername@cs.longwood.edu
  • cd public_html
  • cd 210               // you are now in the right directory on the server
  • lcd Desktop      // the l indicates "local" on your machine.
  • lcd FirstHW      // you are now on the right directory on your machine
  • put Page1.html    // transfers the file Page1.html from the local directory to the directory on the server