Lesson 10: Publishing Your Web Pages

Prev Next

In this lesson: Concepts | Using FTP | Flush Cache | Other Operations

 

In the previous lesson, you learned how to create Web pages form templates. In this  lesson, you will learn how to create a Web directory in your CCSO account and send your files into this particular directory to publish them. This is the most exciting moment, isn't it?
 

The Concepts

So far, the Web pages you have created are stored in your disk. They are not yet to be seen by your friends and the public on the Internet. To publish your Web pages, you have to use FTP programs to send them to the server. A server is a system (including hardware and software) that handles requests for data, e-mail, file transfers, and other network services from other computers (Here at UIUC, you will probably send them to the server called "students.uiuc.edu"). The server will send your Web pages and other objects to the users (clients) upon request so that they can view your pages. To simplify, just imagine that there is a computer in CCSO that acts as a server and provides network services. The relationships among your computer, servers, and clients are illustrated below.

Network

 

Every registered student of UIUC has an account in the students.uiuc.edu server. Besides the e-mail service, this server allows you to send (upload) your Web stuff and publish them on the World Wide Web.

However, for security reasons, Web pages on CCSO machines must be located in a subdirectory named public_html beneath your home directory. You have to create this particular directory if you don't have it. Moreover, every time you send new documents to public_html, you have to "set permissions" which allows your new pages to be view on the web.

Back to top

 


Using FTP

1. First, open an FTP program.

A. If you are using a PC at a CCSO site, choose Start --> Network Services --> FTP
open ftp
B. If you are using a PC at ICL (Room 10 Ed), choose Start --> Programs --> WS_FTP LE --> WS_FTP LE.
C. If you are using your PC at home, choose Start --> Programs --> WS_FTP LE --> WS_FTP LE

Note:
If, unfortunately, you do not have the WS_FTP LE program installed on your own computer, just lick here to download WS_FTP LE. Double-click the downloaded file ws_ftple.exe to install the program.

2. Once the FTP program is launched, you'll see a window something like this:
logon server
3. Log on to the server.

Type students.uiuc.edu as Host Name/Address. Choose UNIX (standard) as Host Type. Type your netID and password and hit OK to log in. If you are using a PC in the lab, do not check Save Pwd. Otherwise, other people can get access to your account when they use the same PC.

If you are quite sure about your password but have trouble logging into the server, you may need to contact CCSO Help Desk.

4. Once the program is open, it should look something like this:

after logon
5. The files on your left are the files on the computer you are working on. The files on your right are the files on your student account on the server (the diagram above shows the files in the home directory). If you do not have the directory named "public_html" on your account, you have to create it.

6. To create the "public_html" directory, click on the MkDir button on the right hand side. When prompted to enter the name for the directory, type "public_html" in the box and hit OK.

7. Now that you have the "public_html" directory, you need to set permissions for this directory. To do this, first launch telnet. Then connect to students.uiuc.edu and log in. If you are using a PC at home, click here for different instructions.

8. At the menu prompt, type U to go to the UNIX Prompt.

go to unix

9. You are now at your Home Directory. The $ sign is the UNIX prompt, waiting for you to enter a command.

Unix home

10. Type webperm and hit <enter> (webperm = web permission). Wait for the system's response. If no error occurs, then the permissions for the directory are set. Do not close telnet. We will need it later.

set permission

11. Go back to WS_FTP LE. Open your "public_html" directory by double-clicking on it. You will put ALL of your web related files and images in this directory.

in public_html

12. Before uploading, you need to locate your files on your computer (left side). Use the green arrow button  to move around to locate files. Double-clicking on this arrow will move you to the upper directory. If you store your files on the Desktop, you have to double-click on the green arrow button several times until you get to c:\ (the root directory of the c drive). Then double-click on the directory called "WINDOWS" (you may need to scroll down). Finally, double-click on the "Desktop" directory. On the other hand, if you keep your files on a floppy disk, scroll down to find the -a- drive and double-click on it to open it up.

locate files
13. Now you are ready to upload your files to the server. Make sure you have your public_html directory open on the right and your web files on the left.

14. Notice the two arrows in the middle? The left arrow Left arrow button downloads (retrieves) files from your student account down to your computer. In contrast, the right arrow Right arrow button uploads files from your computer to your student account on the server.

Also notice three options near the bottom. When transferring HTML files via ftp, be sure to set the transfer mode to ASCII. When transferring image, sound, or other binary files, be sure to set the transfer mode to Binary. If you are sending both HTML and image (i.e. gif and jpg) files, or if you are not sure, just check on Auto. Click here for more information.

15. To upload your files, choose the file by clicking on it. Then hit the Right arrow button button to upload it to the server. Upload everything  -- html files, images, etc. -- related to your web page. Do not just upload html files. Remember, images or other objects on a html document do NOT belong to the document. Rather, the html document contains only the references to the images or objects. Therefore, you have to send all the related images or objects together with the html document.

Helpful hints:

  • To upload multiple files at the same time: (1) hold down the Ctrl key on your keyboard and click each file, or (2) hold down the Shift key to choose a group of adjoining files (play with it a little bit).
  • To upload an entire folder: highlight the folder and click on the transfer arrow. Remember, it's best to have 'Auto' set when sending groups of mixed HTML and picture files.


uploaded files

16. Your files should be stored on your account now. However, they are not made public yet. (If you try to open your page at http://www.students.uiuc.edu/~your_netID/eport.html , you will get the message "Forbidden").

17. Set permissions for access to your webpage files: ( Earlier you set the permissions for the directory. This time you will set permissions for the files you just uploaded).
 

  1. Go back to telnet. (If you closed it, launch telnet again. Connect to students.uiuc.edu and log in. Type U to go to the UNIX prompt).
  2. At the UNIX shell prompt, type webperm and press <enter> to set the correct permissions for your files in your directories. Run the webperm command anytime files are added to the public_html directory. If you fail to do so, they are not accessible to the public.
webperm

18. If you get an error message something like "group execution is not allowed", do the following:

  • Go back to WS_FTP.
  • Click once to select the public_html directory.
  • Right-click on the selected public_html directory and choose chmod(UNIX) from the pop-up menu.
  • Check Execute under the Group menu and hit OK.

19. Go to the Web browser (Netscape,  Explorer, or others), type http://www.students.uiuc.edu/~your_netID/filename (including .html) in the location box (for example, http://www.students.uiuc.edu/~rchen4/eport.html). You should be able to view your pages on the Web now. You may want to add it to your bookmark.

Reminder: Run the webperm command anytime files are added to the public_html directory. If you fail to do so, they cannot be seen on the Web.

20. When you are done with uploading, click Close at the bottom of the screen then click Exit.



Flush Cache:
If you make some changes to your web page and want to update the file, make sure to hit the Refresh button to bring up the latest version of your files (WS_FTP will not know you have made changes to your files unless you hit the Refresh button). However, when you use the browser (Navigator) and try to view the change you made, the prior version of your images remains in "cache" and the browser is so lazy that it will only retrieve images from the "cache" without noticing the changes you made to the images. Therefore, you need to "flush cache" (repetitive memory).  This is accomplished by:
  1. Choose Edit -->  Preferences... from the menu
  2. On the far left, click on the "+" sign beside Advanced to open the submenu.
open the submenu
3. Choose Cache. Click on the "Clear Memory Cache" button and hit OK to confirm. Likewise, click on "Clear Disk Cache" button and hit OK to confirm.
flush cache
4. Click OK to close the window.
5. On your browser, click Reload button.

Other Operations

Downloading (retrieving) files
Downloading is just the opposite. Select the file you want to download from the right side of the FTP window and hit the left arrow Left arrow button to copy it to your own computer.
Updating your page
If you want to update a file, you can simply upload your modified file and it will overwrite any existing files with the same name on the server . Important: Before uploading, hit the Refresh button to bring up the latest version of your files.
Deleting files
Just highlight the file you want to delete, and hit the Delete button. To delete a directory, you have to delete all the files contained in the directory before deleting this directory.
Renaming files

Just highlight the file you want to rename, click on the Rename button, and enter the new file name.

Back to top


Prev Tutorial Home Next

.

.