EIW Fall 2000 Lecture Notes - Web Server Installation


Installing a web server

There are a number of Windows95/98 web servers available for free, we will focus on the installation and configuration of the Xitami web server but you can use any web server you want (as long as it supports SSI and CGI).

You can find the Xitami Web Server at:
http://www.imatix.com/html/xitami/index.htm.
Go to the Download Corner and download the Win95/NT Standard version, the file name is bw3225b4.exe. Once you have downloaded the file you execute it (click on it) to start the installation. There are instructions on the "Download Corner" web page that describe what to do when the installation program begins (the install program will prompt you for everything).

Starting the Server

The Xitami server will show up in your Programs menu under "Internet Tools" (or in whatever windows program folder you told the installation program to put it). Start the server by running "Xitami for Windows". An icon should appear on your taskbar that is an X on a green background - right-click on this and select "Setup" to begin the setup procedure.

Setup - Xitami Administration

Setup should start a browser window on the URL http://127.0.0.1/admin. Remember that the IP address 127.0.0.1 is a reserved address that is called the "loopback adapter" - this is an internal IP address used to address a machine itself. Thu URL provides access to the server administration panel via a web interface. You should now see a menu that includes a Configuration button - press this to begin setting up the server.

Configuration

The server comes with a default configuration that will work fine, although it may make things more convienent in the future if you make a few changes. The most important setting is "Main HTML Directory" - this is the folder on your machine that will hold all HTML files that the server can access. The default is the folder named "webpages" which is located in the folder you installed the server software (by default the server is installed in C:/Xitami). You can change this to wherever you will want to put your HTML files. If you do change this setting - you will want to copy the contents of the original folder (C:/Xitami/webpages) as it contains lots of documentation and examples.

Main HTML Directory

Whether you leave the main directory in C:/Xitami or move it, you should be able to access this directory with the URL http://127.0.0.1/. This is now the "home page" served up by your web server - initially this is some documentation about the server.

Xitami test documents

In addition to the server documentation, there are some test documents you should access to make sure your server is installed correctly. to try out these documents just scroll down near the bottom of the home page and click on the button labeled "testcgi" to test out a simple CGI program that reports a number of CGI parameters. Make sure this works!

You should also make sure that the "Private" button brings up a dialog asking for a username and password - this document is password protected and tests the security setup on your server. To enter the page use the username jacky and the password robusta. If things work right - you will see a page labeled "Private Web Page".

You should also try out the Test SSI page found at http://127.0.0.1/testssi.ssi. This should show you the current date and time according to your computer. By default the #exec SSI Directive is disabled, so that part of the page won't work (the page testssi.ssi includes a directive that tries to exec a CGI program).

Mini-Exercise

Go to the configuration page and click on the link (in the upper left corner) labeled SSI. Here you can see that the server will look for SSI commands in files that end in .ssi, .shtml or .shtm - you can also add other suffixes to this list if you want. You can also turn on the exec directive by clicking on the "Exec command?" box and then clicking on the "Save" button. Make sure the exec command in the testssi.ssi document is now working.

Exercises: Playing with the Server

Here are today's exercises, they all assume you have an operational server!

Create your own servable folder

Create a folder in the "Main HTML directory" and put some html files in the folder. To access these files through the web server you need to use a url like http://127.0.0.1/foldername where foldername is whatever you named the folder. Note that the web server will only serve document that are within the "Main HTML Directory", but that there can be many folders in this directory (and folders withing the folders).

Create your own Home Page

Now create a file named "index.htm" in the folder from the previous exercise. When a URL references a folder - the web server will first look for a file named "index.htm" and return this document if it exists instead of a list of the files in the folder. Once you have created "index.htm" and put something in it - make sure you get this document when you access the same URL you used above.

Create an SSI based web page

Create a web page that uses SSI directives to include a header file and a footer file (with the #include SSI directive) and uses the #exec directive to include in the web page a list of all the files in the directory (hint: use #exec cmd="dir" SSI directive).

Explore relative URLS

Create some sub-folders (folders within the other folder you have been working in) and put some HTML files in the subfolders. Now add some links from your "home page" to these files using relative URLS and absolute URLS. Recall that absolute URLS include the protocol, hostname and URI (for example http://127.0.0.1/myfolder/blah/foo.htm is absolute and blah/foo.htm is a relative URL).

Make sure you understand how to use relative URLs - ask for help if you don't understand the difference!

Congratulate Yourself

You are now a webmaster and have your own website! Give yourself a high-five and state out loud "I am the master of all that is web".