Internet Publishing - PPI

"Materials used in this course are the property of the author. These lessons may be used only by course participants for self-study purposes. Application for permission to use these matierals for other educational puposes such as for teaching or as a basis for teaching should be directly submitted to the author."


Lesson 3: WWW Technology

This lesson deals with downloading and installing of a World Wide Web server for MS Windows. This shall be tested and the documentation studied.

For many who are going to publish on the Internet, UNIX would be the natural choice for running the web server. However, we will not practice with UNIX. The reason for this is that the course is a distance learning course, and the typical distance learning student uses a Windows PC connected to the Internet via modem. Therefore, we will practice on WWW servers which run on Windows. And we will run the WWW server on the students own machine.

We know that a few of you have either a permanent connection to the Internet, or run UNIX, or maybe both. if you want to try running the exercises on a platform other than Windows, you can give it a try, but the texts and exercises have been written specifically for practicing with Windows 95/NT or Windows 3.x.


Note:
We have as well designed the course such that both the server and client can be run on the same machine.

I will try to run two parallel exercises:

If you wish to try a server for UNIX, a list of www-tjenere can be found at this URL.

A WWW server can also be called a httpd which stands for http daemon. A daemon is a program which realizes the service on a server.

Both of the servers we will be using were developed by Bob Denny. The advantages of using these, as I see them, are that:

With that said, it must be emphasized that UNIX is still the first choice for running WWW servers on a larger scale. This is because UNIX (and LINUX) have better multitasking capabilities than Windows. UNIX also has easier CGI programming because the operating system has well-defined ways of sending data from one program to another (stdin and stdout). In recent few years, the use of Windows NT as a general platform, and specifically as a WWW platform, has become widespread. Windows NT and UNIX are now the two rival platforms for web servers and high performance.

Windows 3.x is not really an operating system in the strictest sense; it is a MS-DOS program. This platform is dying out, but is still usable for some time. For less complicated publishing, it is a possible alternative, and it is still satisfactory for teaching purposes.

The servers we shall use are simple to get started on, and if one has a PC permanently connected to the Internet (for example, through Ethernet), one can run Win-httpd or WebSite for publishing on the Internet. With a moderate number of users, one will not even notice it is there, that is if one does not allow the program to boot up a lot of complicated search programs and the like.

Note: Client and Server on the Same Machine

In this exercise, we will use the technique of running a Web server on the student's own machine. In some of the exercises you will use the web-server from a web-client (web-browser), and you will then run both the client and the server on the same machine. This works even though the machine may not connected to the Internet at the moment. However, there must be TCP/IP software on the machine, because both the client and ther server "talk" via the Network software regardless of where the they may be placed.

This has been a point of misunderstanding for several previous students so I wish to spend a little time to clear it up:

1 - Regular Use of WWW
For regular use of the Web, the user runs a web-client (for example, Netscape) on his/her own machine, and with this web-client the user connects himself/herself to web servers which exist on other machines on the Internet.
The user accesses the information (HTML file) via TCP/IP network software and a WWW server.

2 - Our Exercise
In our exercise we will move the WWW server onto the same machine where our client runs. We do this because we want to be able to practice on just one machine. As long as we send the information (HTML files) through TCP/IP and a WWW server, this should theoretically function in the same manner a client and a server running on different machines should function.

In both these cases, the user will access the information by referring to a URL in the form of http://www.domain.no/directory/file.html

3 - Use of Local Files
Our exercises can easily be compared with the situation where the information is located on the same machine as the client. This is the case when the user does not use TCP/IP software nor a WWW server, but opens the file directly in the WWW client:

In this case, the user can access the information by typing a URL using the following format: file:///C|/directory/file.html

The information presented in the web-client will look the same to the (human) user in these three situations. Therefore it is important that you understand which situation you need to be:

Where Do I Find WWW Servers?

Those of you planning to practice on Windows 3.x machines should use Win-httpd Version 1.4.

Those practicing on Windows 95 or Windows NT should use WebSite.

Where Do I Find Win-httpd?(Win 3.x students)

You can go to the official home page for win-httpd (http://www.city.net/win-httpd) which provides you with information on win-httpd including other links for downloading. Or, you can also go directly to the download page. If you want to get the file from another site, you can use FTP search (http://ftpsearch.ntnu.no/ftpsearch/) to find the closest mirror site. The file is called whttpd14.zip.

How Do I Install Win-httpd?(Win 3.x students)

Go to your root directory and create a directory called c:\httpd. Open this directory and save the distribution file (whttpd14.zip) to it. Give the command pkunzip -d whttpd14. (The -d option ensures that you keep the catalog structure in which the files were packed in.) It is important to do this correctly. This is not the point to start being creative.

The server is also dependent upon knowing what time it is where you live in relation to the clients which it communicates with which can be located anywhere in the world. You must tell the system which time zone you live in. This is done by setting up an (MSDOS )environment variable TZ. I think the correct value for Norway and the Netherlands is MET-1DST. This means something like "middle European time" (or Greenwich Mean Time), an hour ahead, with summer and winter time (daylight savings time). In England, perhaps you're right on GMT ? - then you should use MET0DST. In Greece I beleive you are 2 hours ogg GMT, that should be MET-2DST.

Put the following (adjusted for hours) in the autoexec.bat, so that this is done automatically:

    set TZ=MET-1DST

If you want, you can place httpd in the start up group on your PC so that it starts up automatically each time Windows is booted up.

Where Do I Find WebSite?(Win95/WinNT students)

You can find WebSite at http://website.ora.com/. Download WebSite v1.1.e. This is free after registration when not used for commercial purposes.

The file is over 4 MBytes so it may take some time to download. With a 28,800 bps modem, you will (if I calculated correctly) use at least half an hour. A 14,400 bps modem will take one hour, and so on. The moral is: download when your telephone rates are at their lowest (in Norway after 17:00 or on the weekend).

How Do I Install WebSite?(Win95 students)

A compressed file website-11e.exe will be transferred which you can execute. During the installation, you will get several questions about the name of your WWW server. You should type in the correct DNS name for this machine, if it is permanently attached to the Internet. If you will be running this on a standalone or modem-connected machine, no one else will be able to access it so you can use whatever name you want.

Can I Run a WWW Server at Home?

Yes, you can. It may seem a little excessive to run a web server on your own PC, but such a personal web server is actually very practical. It makes it possible to link together your documents and put them into one system. Before - when I wrote things and saved them to a file, they just disappeared into the PC. Now, I at least have the possibility of setting up links and search engines (more on search engines later). It is also possible to index documents on your PC so that you can search on character strings in your documents.

In addition, it is great to have your home page on your local machine when using Netscape to surf. (You don't need to have a running server in order to have your home page on a local disk.)

Through this course, you will learn to:

  1. program in HTML code, and
  2. set up a WWW server

We will use a client program when practicing.

In order to look at the HTML code on a local machine, it is not really necessary to use a WWW server. We can simply open a local file directly in the client program (File/Open File in Browser). See point 3, "Use of Local Files" above. In order to edit on the HTML-files it is impossible to access HTML-files through a web-server, they must be opened as local files.

In order to test a server, we must let the WWW server feed the client program with HTML files. That is, we must not open HTML files directly (with File/Open File in Browser), but we must open a URL (in Netscape, File/Open Location). See point 2 (Our Exercise) above.

Now the WWW server will feed the client with HTML documents, and the medium between the server and the client is TCP/IP.

Even though you may be working locally (that is, not connected to the Internet), you must run the network program which contains winsock and a TCP/IP stack (whatever that is).

Windows 3.x Users:

Many of you using Windows 3.11 will use Trumpet Winsock. You may discover that it takes a long time for Win-httpd to initialize. This may occur if Trumpet finds out that it is not connected to the Internet because you have not set up the the modem connection. You can fix this by turning on your modem. You do not need to dial in, just keep the power switched on. (Make sure that Trumpet does not automatically begin dialing when you start up the program using TCP/IP.)

Windows 95/NT Users:

Most of you will probably use the TCP/IP software that came with Windows. It is possible to use other software packages as well.

Become Familiar with Your Web Server

Unpack and install the web server. You will now have access to a lot of documentation. Please read through and study most of it. Later, we will train on and experiment with set-up and configuration.

You will have access to documentation by using a WWW client on your own machine. Which address you use to begin reading form your WWW server can vary somewhat:

  1. If you have a permanently connected machine with its own IP number, you will always want to start at: http://<own_IP-no.>. Additionally, you will want to begin as described under point 2.
  2. If you are running a machine without a permanent IP number, you can usually start at: http://localhost or http://127.0.0.1 or http://0.0.0.0. This can vary a little with different TCP/IP implementations. Try these links.

For Windows 3.x students (Win-httpd):

You can also use Notepad to examine the configuration files. Look for:

    c:\httpd\conf\httpd.cnf
    c:\httpd\conf\srm.cnf

For Windows 95 students (WebSite):

You can use the program WebSite server properties to look at the configuration of the server.

If anything is unclear, read the documentation. If you are still confused, you can post a message on our HyperNews discussion forum.

Problems?

Please read the documentation on your own machine. If for some reason you cannot get this to work, I advise you to prioritize getting this to function. In the meantime, you can read the documentation on my machine, try these links:

Win-httpd documentation

WebSite documentation

(I try to keep these servers up continuously, but there is no one to restart them after 16:30 and in weekends.)

Basics About URLs

URL stands for Uniform Resorce Locator. Read about URLs. If you run Win-httpd you can read about servers at http://localhost/httpddoc/info/urlprimr.html or you can read about URLs from my practice machine.

In addition to your textbook, I would like to mention that it is problematic that URLs specify servers and not the resource. For example, if I am going to use the search engine Lycos, I have many machines to choose from, but I must find out which machine is not heavily burdened myself. (I can test a machine and find out if it is overburdened. Then I can try another and another and so on.) It would have been better if I could say which service I was looking for, and then I would be automatically referred to an available machine close to where I live.

Reading In the Textbook

Chapter 4 in the textbook describes a few different web servers. Read this chapter to find out more about them and which functions they have.

Exercise

The exercise for this lesson will, of course, be to install the web server, either Win-httpd or WebSite.

Send in confirmation, a short e-mail stating that you were able to get httpd to work by 1 April. 1997.

Later exercises in this course will assume that you have a web server running, so if you have problems, please contact your assigned teacher's assistant.


<per@idb.hist.no>

11.3. 1997