Step 1 - Getting Started

Introduction

Each engineering account comes with a special folder in the home directory (H: drive) called public_html. This folder has been set so that everyone can read it without the rest of your account being exposed. All files and folders in public_html are set as read only when they are published. If you have problems with your web site, please contact the webmaster.

Files

A web site starts with a web page named index.html. This page is what appears when people type in your web site URL (user.engineering.uiowa.edu/~loginID). Any web page, including this one, is simply a text file filled with HTML commands.

Even though there is nothing on your newly created page, you (and the world) can see it at the URL: https://user.engineering.uiowa.edu/~loginid

Step 2 - How to Write a Web Page in HTML

If you have followed step 1, you need to add the information you want. All you have to do is grab your favorite text editor and write the .index.html file in HTML, Hyper Text Markup Language, which lays out the general text, banners, images, and links to other pages. To see the HTML script of a page, Press Ctrl+U (Firefox) or go up to View and select Source (Internet Explorer). You'll see a window displaying a scripting language surrounded by greater-than (>) and lesser-than (<) signs. These symbols provide the format codes to the document.

How does one write HTML? The easiest way is to use a web authoring package; Dreamweaver, Microsoft Office SharePoint Designer, and Front Page are examples. But it helps to know some basic HTML, the underlying language that makes web pages look as they do. Below are a few links to introduce HTML. Use Google to search for others. Look around the web for any web pages you find interesting and easy to view, and incorporate bits and pieces of that HTML source into your page.

HTML Primer from the htmlprimer.com site; good site navigation and search tools

Bare Bones Guide to HTML comes in several languages

W3 HTML Tutorial tutorial, examples, quizzes, HTML references, and more

Lissa Explains It All This site is not just for kids.

Here are a couple links to give you a sense of style, what to do and to avoid. If you look, you'll find plenty of advice about writing HTML and effective web pages by searching the web.:

W3C Web Style Guide from the people that brought you the web, World Wide Web Consortium

Web Style Guide illustrations and clickable links

You can find free templates for HTML pages; search the web for "free html layouts templates".

There are also many books published on web authoring, HTML, etc. Check the library and local bookstores, and search the web for on-line training and other publications.

Go on to step 3 for some reminders and guidelines about web pages.

Step 3 - Restrict Web Page Access - .htaccess

What Is .htaccess?

htaccess is a way to restrict access to (parts of) a web site to specified users and those passwords. In the example below, you are allowing user bgreene access to a web page in your public_html directory.

How Create the Necessary Files?

Now create a .htaccess file in the directory you want to protect (or the directory that contains the file(s) you want to protect). In this example, you are protecting a file in the directory "solutions" in your public_html directory. The pathname, thus, is: /user/eng/accountID/public_html/solutions/

  1. Login to your account using a Linux workstation, either by sitting at a Linux workstation or by using FastX from a Windows computer.
  2. Create a password file using the htpasswd tool. In this example only the account bgreene is included for access to the file. The htpasswd tool encrypts the password. It prompts for a password and writes the user name (bgreene) and encrypted password to the file you specify. The password you create should be a secure one; here is our information about what makes a good password. If only College of Engineering users will have access to the web page, you can use Kerberos authentication, as explained below.

    htpasswd –c ~/.htpasswd bgreene

    Use the "-c" argument ONLY on the first run. You can add additional usernames and passwords to this file using the htpasswd command without the ‘-c’.

    Note: do NOT put this file in the directory where you put the .htaccess file. We recommend you put this file in your home directory.

  3. Give the world read access.

    chmod 644 ~/.htpasswd

  4. After you login, change to the solutions directory: cd ~/public_html/solutions
  5. Create a file like the one below, substituting your account ID for "accountID" and the account to have access for bgreene in the example.

    AuthType Basic
    AuthName "Welcome. Please sign in."
    AuthUserFile /user/eng/accountID/.htpasswd
    require user bgreene

  6. Make the file readable by the web server

    chmod 644 ~/public_html/solutions/.htaccess

Kerberos

If people getting to the secure web area have an Engineering account, you can use Kerberos authentication. You need to create a .htaccess file, but no .htpasswd file. A sample .htaccess file is shown below. This grants access to all engineering account holders. If you want to restrict access to specified account(s), use the .htaccess/.htpasswd combination described above.

# Specify use of Krb5
AuthType KerberosV5
# name for user
AuthName "Engineering Login-ID"
# default realm
KrbAuthRealm ENGR.UIOWA.EDU
# Demand valid user
<Limit GET>
require valid-user
</Limit>

For Security

As noted above, to provide security,

  • the password used by the htpasswd file should be a good (not easily guessed or cracked) one.
  • make the web page one protected by SSL (https://...).

Step 4 - Guidelines

Before you start creating web pages, here are a few things you ought to know and consider. It is your responsibility to keep your pages up-to-date, legal, and ethical.

Reminders & Guidelines

Test your web pages to make sure images show up and links work, and to verify that the pages look as you expect and like. If your pages or images are not visible, you probably need to correctly set permissions for the directory or the file. Go to to see how to set permissions. Also test your pages using more than one browser (Firefox and Internet Explorer, for example); the same code can look different with different browsers. Keep in mind that not all browsers are graphical browsers; some people use text only browsers like Lynx.

University of Iowa authors should also be aware of and abide by the web content standards.

Remember, everyone can see your web page. Web pages you create and publish are viewed by people beyond this university. Anyone with Internet access could stumble onto your web page. It could be your family members, a prospective employer, or your closest friends. Keep in mind how large and varied your potential audience is.

Don't use copyrighted material without permission. If you have material that is copyrighted, it is illegal to put it in you web page without the owner's permission. Though there are many web sites that contain free graphics to use on web pages, check the terms of use; you may be required to include a copyright notice if you use those images. Using copyrighted material to make your own creations may not violate copyright laws, but the line between legal and illegal is not clearly drawn.

Consider that not all people viewing your page have fast connections or fast machines. Many people have trouble reading text on a dark background. Red is not distinct to people who are red-green color blind. Review accessibility considerations for web pages.

Avoid obscene material. In general, please don't link to material containing pornography, sexual content, nudity, and other offensive material. There is no exact description that separates what is offensive and what is not, so try to consider how others might respond to your site.

Animations, scrolling text, blinking words are annoying to many people. Don't use them.

Background images can take a long time to load. Use small or compressed images, or none at all.

Use GIF image for line drawings and JPEG for photos. JPEG images tend to produce better compression ratios than GIFs, but are often also larger and take longer to download.