Illinois Institute of Technology

 

Publishing Your Web Page on itwebmaster.iit.edu

* Making Your Web Pages
* About itwebmaster
* Using Telnet to Connect to Your itwebmaster Account
* Logging into Your itwebmaster Account
* Creating Your Web Page Directory in Your itwebmaster Account
* Uploading Your Web Pages to itwebmaster
* Preparing Your Uploaded Files
* Checking Your Web Pages
* Editing Your Page Directly on the Server
* Publishing Your Pages to the Server with WYSIWG HTML Editors

Making Your Web Pages

This tutorial assumes that you already know how to write a Web page. If you do not, please take a look at the IIT Internet Access Web Author page at http://imc.iit.edu/internet.access/IIT_WebAuthor.html.

About itwebmaster

itwebmaster.iit.edu, IIT's Internet Technology Webmaster Certificate Program's primary Web server, runs a free version of the UNIX operating system called Linux. You will be using a command line interface to communicate with the server, which means that you will communicate with the server by typing in commands (like DOS) rather than clicking on icons (as in Windows or on a Macintosh). Your Web pages will appear to be in a subdirectory of your account on itwebmaster, even though they are actually served by another computer.

From here on, we will take you, step by step, through the process of uploading your pages to itwebmaster, giving you the required UNIX commands along the way. If you want to know more about UNIX in general, please take a look at Welcome to UNIXhelp for Users.

Using Telnet to Connect to Your itwebmaster Account

First you will need to use some form of Telnet to get into your account and prepare your directory for your Web files. The type of online access you have will determine the way you Telnet to itwebmaster.

PPP/Campus Network

If you are using PPP dial-up access or the CampusTCP/IPNetwork for your online connection, you can use a telnet client, such as WinQVT for Windows or NCSA Telnet for the Macintosh to telnet to your itwebmaster account. Follow the instructions that come with your program to telnet to itwebmaster.iit.edu, then follow the instructions below. Or in Windows 95/98 or NT, you can use command-line telnet by clicking on start, clicking on run and typing telnet itwebmaster.it.edu in the dialog box. This will work exactly the same as Telnet Between Two Shell Accounts discussed below.

Commercial Services

Online services such as America Online or Compuserve may provide their own Telnet clients or you can use a telnet client such as the one built into Windows95/98. Follow their online documentation to Telnet to itwebmaster.iit.edu, then follow the instructions below.

Telnet Between Two Shell Accounts

Telnetting between another shell account and itwebmaster is very simple. At the system prompt, issue this command followed by a carriage return:

   telnet itwebmaster.iit.edu

and you will be connected to your itwebmaster account. Once you have done this, log in using the instructions below.

Logging Into Your itwebmaster Account

Once you have connected to your itwebmaster account, you will be asked for your username and your password. Enter each one as it is asked for, followed by a carriage return.

Creating Your Web Page Directory in Your itwebmaster Account

The way to create your Web page directory, www, on itwebmaster is to type

   mkdir www

at the itwebmaster prompt. This will create the necessary directory. You must than set file protections on the directory by typing

   chmod 711 www

The Web server is set up to recognize files named index.html in each directory as the default file, with your www directory as the default Web directory. This means that when no other file in a directory is specified, the file named index.html will be displayed. We recommend that you identify which file is going to be your main page and call it index.html. Not having an index.html file is a potential security problem as it allows anyone access to all files in your www directory.

To learn more about setting file protections, see Setting Permissions for Files and Directories below.

Uploading Your Web Pages to itwebmaster

Next you need to get your Web pages from your local computer to your itwebmaster account. Again, how you do that will depend on what kind of access you are using and what type of software you are using to establish your online connection.

PPP/Campus Network

If you are using PPP dial-up access or the CampusTCP/IP Network for your online connection, you can use an FTP client, such as WS_FTP for Windows or Fetch for the Macintosh, to move your files to your itwebmaster account. These are usually point and click applications. Or in Windows 95/98 or NT, you can use command-line FTP by clicking on start, clicking on run and typing ftp itwebmaster.it.edu in the dialog box. This will work exactly the same as FTP Between Two Shell Accounts discussed below.

Commercial Services

If you are using an online service such as America Online or Compuserve, these services provide their own FTP. Check with their online documentation for specific instructions.

FTP Between Two Shell Accounts

Let's assume that you are FTPing from another account to your itwebmaster shell account, issue the command:

   ftp itwebmaster.iit.edu

After connection, you'll be asked for your username and password. Give the username and password associated with your account.

Next, change directories to your World Wide Web directory by typing:

   cd www

Now, you want take ASCII files from the other account and *put* them into your itwebmaster account. You do this with the put command. For example, if you want to put the file index.html into your itwebmaster account, use this command followed by a carriage return:

   put index.html

to move it. If the file were named index.htm, you could even type:

   put index.htm index.html

which would automatically change the name of the file as it transferred.

You can also use wildcards to move multiple files. For example, if you want to move all the files ending with .html, use the following commands, each followed by a carriage return:

   prompt

   mput *.html

The prompt command doesn't actually do anything, it actually keeps something from happening. If you issued the mput *.html command without it, itwebmaster would doublecheck with you before moving each file. This can be tiresome. So, to avoid it, you can turn off this feature with the prompt command.

Note: The preceding commands are only good for ASCII files, also known as Text files. Graphics files must be handled a little differently. Before moving any graphics files (.gif, .jpg, etc.), issue the following command followed by a carriage return:

   binary

This will alert itwebmaster that a binary file is coming and the server will treat it accordingly. If you do not do this before moving a graphics file, the graphics file will become corrupted and will not work

You can use the ls (short for list) command to check the itwebmaster account and see that your files are actually there.

Preparing Your Uploaded Files

Now that you have established a Telnet connection to your itwebmaster account and your Web files have been uploaded, you need to make a few adjustments to the files before they can be accessed by a Web browser. You need to login to itwebmaster again (if you are not still logged in).

First, make sure that your files are in your account. Use the command:

   cd www

to change directories to your Web directory and then type

   ls

to list all your files. If you are accustomed to DOS, this is the equivalent of the dir command

Changing Filenames

Since the itwebmaster Web server is set up to recognize files named index.html in each directory as the default file, this means that when no other file in a directory is specified, the file named index.html will be displayed. Since the main file you might have created is probably index.htm, you will need to rename it to index.html.

You may also have to rename other files. If you created your files on a DOS computer, your files probably end with an .htm extension. These files should be renamed so that they have an .html extension although .htm should work.

Renaming files in UNIX is simple. Let's assume that you want to change a file called example.htm to index.html. Use this command:

   mv example.htm index.html

Filename Rules

  1. Don't use duplicate filenames because the second file will overwrite the contents of the first file.
  2. You can use up to 256 characters in any file or directory name. Extensions are optional and unlimited.
  3. The following characters are illegal in UNIX filenames: ? ! @ # $ % ^ & * ( ) - + ' " ? / \ |
    Your best bet is to limit yourself to alphanumeric characters (letters and numbers).
  4. Do not put spaces in your filenames. Use periods or underscores to represent spaces, like this: my_file.december.
  5. UNIX filenames are case sensitive. This means that index.html, Index.html, INDEX.html, and InDeX.html are all considered to be different filenames.

Setting Permissions for Files and Directories

In order for your files to be accessed, you must give users permission to use them. If you type the command:

   ls -l

You'll see a list of files that looks a little different than the list you saw when you used the plain ls command. Here's an example of a display generated by the ls-l command:

     -rwxr-xr-x 1 trygstad staff 5467  Jan 30 1999  personal_homepages.html
     drwxr-x--- 2 trygstad staff  512  Nov 30 1999  private/
     -rw-r--r-- 1 trygstad staff 26970 Apr 22 08:41 resources.html
     -rw-r--r-- 1 trygstad staff 1577  Jul 7  1999  riceppp.cmd
     -rw-r--r-- 1 trygstad staff 788   Jul 7  1999  riceppp.zip
     -rw-r--r-- 1 trygstad staff 1093  Jun 3  22:35 index.html
     -rw-r--r-- 1 trygstad staff 2213  Apr 30 22:35 sidebar.gif

The information on the far left indicates what type of permission is given to each file and directory. The very first space indicates what type of file this is. Notice that the second item from the top is a directory; this is indicated by the d in the first space. The rest of the items are regular files; this is indicated by the blank space at the beginning of the line.

After the first space, there are nine spaces left over. The first three spaces indicate what permissions are given to the owner of the file (that is probably you), the second three spaces indicate what permissions are given to the workgroup (don't worry about this), and the last three spaces indicate what permissions are given to the general public.

Each of the letters stands for a different type of permission:

   r = read access (the indicated user may look at the file); numerical value = 4
   w = write access (the indicated user may open the file and change it); numerical value = 2
   x = execute access (the indicated user may use directories and execute programs); numerical value = 1

All of your .html and graphics files should be set so that the owner has read and write access and the group and general public have read access. The easiest way to do this (let's assume the file we are changing is called index.html) is:

   chmod 644 index.html

If you want your html file to be executable (necessary under some circumstances), you would type:

   chmod 755 index.html

You can use wildcards with this command, for example, if you want to change the permissions for all the files ending with .html, use the command:

   chmod 755 *.html

Making Subdirectories

If you want to make subdirectories to organize your files, you can do so with this command (let's assume that you want a subdirectory called beans):

   mkdir beans

This subdirectory and any others that you make require a different permissions setting than regular files. To set the permissions a directory (still using beans as an example), use this command:

   chmod 711 beans

You can use the ls -l command to compare the permissions set for your files to the ones in the example above.

You can also rename directories that have already been created by using the mv command.

Checking Your Web Pages

When you are done with your itwebmaster session, you can log out of your account with the exit command. Now, check to see if you can access your pages with your favorite Web browser. Remember, every browser has it's own way of displaying a page, so be sure to use correct HTML to be sure that your page is displayed to it's best advantage regardless of the browser used to view it. Help with HTML is available if you need it.

Your URL will be:

   http://itwebmaster.iit.edu/~username/

This assumes that your main page is called index.html, which is the default filename. See the section on changing filenames if you missed this part.

Editing Your Pages Directly on the Server

To edit your pages in a telnet session, change to your www directory after login, then type

pico index.html

(or whatever the name of the page is) and press enter. You will be using the Pico text editor. When you are done, save your page by pressing control-o. You can then test the page by viewing it in Netscape or other web browsers.

Publishing Your Pages to the Server with WYSIWG HTML Editors

Two editors are addressed here: AOLPress and Netscape Navigator Gold. Procedures for use of Microsoft Front Page and Adobe PageMill should be similar.

Publishing Your Web Page with AOLPress 1.2 or 2.0

When you are ready to save your page, ensure you are connected to the Internet with a network or dial-up PPP connection. From the File menu, select Save As... ; when the Save As dialog box appears, enter ftp://username@itwebmaster.iit.edu/[path]/filename.html, using your username where it says username and your desired filename where it says filename.html (as shown below). Where [path] appears, you need to put in the full path to your www directory; to determine this, log onto itwebmaster, change directories to www, and type pwd, which will display the path.  When the login dialog box appears, enter your username in the Username box and your password in the Password box. Finally, click ok, and your page will be published on the server. After the first save in a session, subsequently you only need to select File-->Save and AOLPress will save your document to the server, as well as any necessary graphics.   

Publishing Your Web Page with Netscape Navigator Gold

When you are ready to save your page, ensure you are connected to the Internet with a network or dial-up PPP connection. From the file menu choose publish. In the Publishing location: Upload files: box enter ftp://itwebmaster.iit.edu/[path], using your username where it says username. Where [path] appears, you need to put in the full path to your www directory; to determine this, log onto itwebmaster, change directories to www, and type pwd, which will display the path. Then enter your username in the Username box and your password in the Password box, as shown below. Finally, click ok, and your page will be published on the server. You can select to upload all images in the document at the same time, or if you have a group of files to publish that are all in the same directory, you can publish all of them by selecting All files in document's folder under Local files.



Adapted from How to Use Your Shell Account at http://www.gbgm-umc.org/conferences/shell.html (now a dead link), on the United Methodist Church General Board of Global Ministries Web site; by Susan R. Hagan, shagan@mars.superlink.net.
Used by permission.

Home Search Admissions Feedback
Last Updated January 6, 2000 by
Ray Trygstad (trygstad@iit.edu)