Web-Wise

On Bama, we are running the Apache Web server. It is so named because a group of programmers and web administrators got together and modified an old standard web server in "a patchy" way. They fixed up the old server's bugs and added many new options. The Apache Web server is now the most used server out there.

We are running this server fully configured. This means you can:

  1. Put personal web pages under "public_html" and have them appear on the server under ~userid, where userid is your real user id.
  2. Run your own cgi scripts in a personal cgi-bin directory.
  3. Use Server-Side includes.
  4. Put out password-protected web pages or web pages that accessible only to the campus domain (ua.edu) or even exclude the campus domain.
  5. Support web servers with a name other than "bama.ua.edu".

Personal Web Pages

The server uses the standard name of "public_html" for individual web pages. Anything which you put in the subdirectory called "public_html" under your home directory is accessible on the World Wide Web as

http://bama.ua.edu/~your-userid/

where "your-userid" is your actual user id. You can have as many subdirectories as you like with as many files as you like (or have space for). Your home page would normally be named "index.html" but in you have server-side includes (see below) then you should name your file "index.shtml".

Personal CGI Scripts

(Editor's note: This section is no longer accurate. Correct information about personal CGI scripts is available.)

The server will permit individual cgi scripts anywhere in your public_html directory tree although the standard is to put them all into a cgi-bin subdirectory under public_html. You should attach the suffix ".cgi" to tell the server that it is a script to be executed and not a plain text file (you can use ".pl" in the case of perl scripts). You can use both the standard forms of information passing ("put" and "get").

Server-Side Includes

Any file with the suffix ".shtml" will be interpreted as a Server-Side Include (SSI) file. That means there can be directives in the file (conforming to the SSI standards) that will be processed at the time the page is served out to the web. You can have SSIs in your home page by calling it "index.shtml". A common SSI in home pages is a web-page access counter (although there are non-SSI counters).

Protected Web Pages

Subdirectories under public_html can be protected either by individual names and passwords or even can be restricted to viewing by individual machines. The protection extends to entire subdirectories, not just files, so that all material in a protected subdirectory will be covered.

Restricted access to individual users is covered in a UA web page at:
http://bama.ua.edu/~unixinfo/web/webfaq.html

You can also protect a page so that it can only be read by someone coming in on a machine which is on the University of Alabama network. This covers machines on campus and people who come in on the University dial-up phone lines. To protect web pages in this way you would create a file called ".htaccess" (that's dot htaccess) in the directory where the protected web page will be located. The contents of the file would look like this:

<Limit GET> 
order deny,allow 
deny from all 
allow from .ua.edu 
allow from 130.160. 
</Limit> 

Be sure to have "dot"ua.edu and 130.160"dot" (leading and trailing period, respectively). You will need both of these because some campus machines only have a number, not a name. You can deny access to machines on campus by swapping the words "deny" and "allow" in the above example.

Virtual Web Hosts

Bama can host web sites under names other than "bama.ua.edu". This is useful if there is a web site which has been running on a server by a particular name and it is desired to move the site to Bama without changing the name. The virtual web site on Bama under the different name functions separately from the Bama set of web pages. This configuration cannot be setup by individual users, and setup for departmental web sites must be requested through the computer center.

 

There is a great deal of information available on the web about the Apache Server. For a news weekly on the server (this site includes web help) go to: http://www.apacheweek.com

The home site of the Apacher server is http://www.apache.org

 

© 1998, The University of Alabama. The information included here is for the University of Alabama central computing facility as it was configured on the document date. It may or may not apply to other Unix systems.