Web Pages - Frequently Asked Questions

1. How do I create a home page?
2. How do I change permissions on my web files and directories?
3. Is there a quick, easy way to see examples of pages written in html?
4. Where do I store cgi files?
5. How can I display files for others to download?


1. How do I create a home page? back to the top

This set of instructions for making your own home page is written for CBU's Unix system. If you have an account in other places, you may find some differences, however, the basic setup is the same.

This is how you can create a web page:

  1. If you don't have an account, you may request an account here or go by the helpdesk of ITS (located in the Berringer Center) or call the helpdesk at 321-4438.
  2. Once you have successfully logged into your server account, type ls at your server prompt to determine if you have a WWW directory. If you do not have the WWW directory, type mkdir WWW (The Internet server is set to look for the WWW subdirectory.) You may notice your directory also contains a directory titled Intra_WWW. This directory works just like your WWW directory, but is only available to the CBU intranet rather than the World Wide Web. This means that only those on the campus network (or those accesing the network via VPN) may view the files in this directory. An example intranet URL is http://stu.cbu.edu:2080/~username/
  3. To create your index.html file, you can use one of two text editors located on the CBU server, pico or vi. Pico is the easiest to use if you are a novice.

a. At your prompt, type pico index.html (this will open a new file with your cursor at the top of the file)

b. Begin entering your HTML code. The following is a sample page written in HTML

<HTML>
<HEAD>
<TITLE>Sample HTML</TITLE>
</HEAD>
<BODY>
<H1>This is a sample web page written in HTML</H1>
<H2>This is a sample of different size font</H2>
<P>
Enter additional information in this paragraph.
</P>
<P>
Enter more information in this second paragraph and then we will begin a bulleted list.
</P>
<UL>
<LI>(unordered list) First item
<LI>Second item
<LI>Third item
</UL>
<OL>
<LI>(ordered list) First item
<LI>Second item
<LI>Third item
</OL>
<A HREF="http://www.cbu.edu">This is how you add a link.</A>
<BR>The "BR" command is used to begin a new line such as this one.
<BR>The concludes your first web page written in "raw" HTML.
</BODY>
</HTML>

c. To exit and save your web page, hold the ctrl button down and press the letter x. You will be prompted to save modified buffer, type Y to save the buffer/file and then you will be prompted to file name to write: index.html, press enter and your cursor should be back at your server prompt.

d. To make sure that your web page is viewable to the public, you need to perform a permission change by typing chmod 755 index.html. This tells the server that you want the world to be able to read and execute your file.

e. To view your web page, open a web browser. Enter your url (uniform resource locator), which will be http://stu.cbu.edu/~yourusername. The server automatically searches for a file named index.html, so you don't have to type that file name in the url. If you name your file something other than index.html, you will need to add the file name and slash to the url, such as http://stu.cbu.edu/~yourusername/filename.html.

f. If you are not able to view your web page and you have followed these instructions, please email or call the helpdesk for further assistance.

2. How do I change permissions on my web files and directories? back to the top

The chmod command allows you to set the permissions for each file that you create. Permissions can be expressed by alpha or numeric. When the permissions are expressed as a number, it is a three-digit number (XXX). The first digit re presents the owner's permissions, the second is the group's permissions and the third is everyone else's permissions. A list of the permissions are as follows:

DIGIT
0
1
2
3
4
5
6
7
Permissions
None
Execute only
Write only
Write and execute
Read only
Read and execute
Read and write
Read, write and execute
EXAMPLE: at your prompt, type chmod 755 index.html (or chmod WWW), then press enter and you have changed the permissions so that the owner has all, the group has read and execute and the world has read and execute.

3. Is there a quick, easy way to see examples of pages written in html? back to the top

When are viewing a page through an Internet browser, choose VIEW, then SOURCE from the pull down menu. This will show you the web page written in HTML as well as other code, such as javascript, etc.

4. Where do I store cgi files? back to the top

CGI files can go anywhere in your WWW directory. The most common method is to create a cgi_bin directory within your WWW directory and ftp your cgi files to /WWW/cgi_bin. Just remember to use the absolute path when referencing the cgi file in another html file.

5. How can I display files for others to download? back to the top

a. It is suggested that you create a sub-directory in your WWW directory for these files. However it is not necessary to have a sub-directory. Creating a sub-directory is the same as creating a directory, at your WWW prompt, type mkdir "directoryname". You may want to name the directory by topic, such as "ppp" for powerpoint presentations, " itm001" for a particular class, "graphics" for your .gif files, etc.

b. Transfer your files into the appropriate directory using any telnet or ftp session.

c. Add a link to the file from one of you web pages, such as these expamples:
http://www.cbu.edu/~yourusername/ppp/mgmt1.ppt
OR
http://www.cbu.edu/~yourusername/word/mgmt1.doc

d. Make sure your files are accessible via the web by performing the chmod function on your new directory and the files by typing chmod 755 nameofdirectory or chmod 755 filename. (Note: documents that cannot be viewed with a web browser will automatically request that the viewer save the file for viewing using another method. HTML, GIF, JPEG and other web related files can be viewed with the browser and saved using the right click on the mouse.)


FAQ's | ITS | CBU Home
Christian Brothers University
Maintained by: Webmaster
Copyright © Christian Brothers University, Memphis, Tennessee