CSEE Help Pages
Tutorials

Web Page How-To

Anyone with a CSEE Unix account -- which means just about everyone in the department -- can create and maintain her/his own Web page. While special Web-page creation tools are available to help with this task, they are not necessary. You can do it all with a simple (or not-so-simple) text editor like pico, vi, emacs, or Windows Notepad.

You do need to know a few things, however:

Notes:

  1. Web usernames and passwords (discussed below) are not encrypted in any way as they travel over the Internet. We suggest you avoid at all costs using real system passwords to authenticate Web users!

  2. Throughout this page, I'll be using $HOME as a synonym for your home directory -- so if your username is nitrogeek, $HOME would stand for /home/users/nitrogeek and $HOME/public_html would stand for /home/users/nitrogeek/public_html.

  3. Almost every filename, user command, or text-file entry you see below is case-sensitive!

  4. Your home directory and public_html directory have to be world executable. They should already be, but if they're not it could cause problems.

File Basics

When your home directory was first created, it came with an empty directory called public_html. That's where your personal Web pages will live. Typically, your home page will be named index.html, so its full path in the filesystem would be $HOME/public_html/index.html.

To view that page in a Web browser (again, assuming your username is nitrogeek, you could use one of three URLs:

  1. http://www.csee.ogi.edu/~nitrogeek
  2. http://www.csee.ogi.edu/~nitrogeek/
  3. http://www.csee.ogi.edu/~nitrogeek/index.html

All three will display the same page because our Web server knows the difference between a directory and a regular file. When a URL points to a directory -- as http://www.csee.ogi.edu/~nitrogeek points to /home/users/nitrogeek/public_html -- then the server looks for an "index" file. At CSEE, index files can be named index.html, .index.html, or index.htm. If the server doesn't find an index file, then it just displays a list of files in that directory.

For non-index pages, there's usually only one URL that will work. If nitrogeek created a file called coolstuff.html and put it in the same directory with index.html, it could only be accessed via one URL:

http://www.csee.ogi.edu/~nitrogeek/coolstuff.html

Theft is OK, Sometimes

Although this page is not intended to be an HTML tutorial, here's one hint for those with no experience in Web-page creation: steal! Pop open Firefox or Internet Explorer and visit some Web pages. When you find a page that's attractive to you, you can

Remember, however, that while you can use HTML tags and tricks from other pages, you cannot use text or graphics without specific permission from the original authors.

Personal CGI Programs

Since so many CSEE users are programmers, it's worth noting how you can add your own CGI programs to your personal site. We assume that you already know how to write good code, but if you're not 100% sure that you can write good CGI-specific code, then please read

Anyway, the easy way to setup your own CGI programs is to name your file with a .cgi extension, make sure it's world-executable, and place it somewhere in your public_html directory tree. A file named /home/users/nitrogeek/public_html/counter.cgi would be available as

http://www.csee.ogi.edu/~nitrogeek/counter.cgi


OHSU :: OGI :: CSEE :: Support :: CSEE :: Tutorials

This page was most recently revised on February 07, 2006.
Please address questions or comments to the webmaster.