NetManage Web Servers


Getting Started With Your Own Web Server

Welcome to the NetManage sample Web. This has been designed to help you get started with setting up your own World Wide Web server. The Web server can serve HTML and other documents, images, sound files and even movies to Web clients like Chameleon Mosaic+. To achieve this, you need to first create your own Web. The following sections will lead you through the sample Web to clarify the details involved in setting up your Web server. We have even created three sample home pages showing how you can make a home page for a small business or your family.

NetManage Web Servers are available in multiple versions:

All versions of NetManage's Web Server support access logs, standard CGI support, and some form of Basic Authentication.

The Personal Web Server for Window95 is a light-weight web server useful for individuals just starting out as web publishers. It supports a limited implementation of Basic Authentication.

The Personal Web Server for NT is a medium-weight web server useful for small businesses. It can be run as either a user application, or as an NT service.

The Web Server included in NetManage's NT Server package is intended to be an industrial-strength web server useful for larger businesses. Early releases will be identical to the Personal Web Server for NT; it is intended that future releases will include commercial-grade features.


The NetManage Web Server has two features normally found in high end servers forms support and image map support. Check these two pages for examples of how to use these features.

What is a Web?

A Web is a collection of HTML documents and other files that you want to serve to Web clients. This collection of documents and files resides in your Windows filesystem. The starting point of this collection is referred to as the Document Root Directory in NetManage's Web Server. You can have subdirectories under the Document Root Directory and you can place the files that you want to serve in both the Document Root Directory and in these subdirectories. The important point is that your Web is made up of the Document Root Directory and the subdirectories therein and only these are visible to Web clients. The other parts of the filesystem that are outside the Web are invisible to the Web clients. This is a security feature provided by the Web server.

Sample Web

NetManage has created a sample Web that you can peruse to get started with setting up your own Web server. The files in this sample Web are located in the Document Root Directory specified in the Web Server Configuration dialog box when you bring up the server for the very first time. You can look at these files to see how exactly they are composed. This will give you ideas for creating your own Web files and for setting up your own Web.

Click here to see a primer on composing HTML documents.

Here's an embedded image that you must be really familiar with.

Here's the same embedded image again, but this time you can click on it and make it do something. Try clicking on it.


Web Server Features

The NetManage Web Server has two features that are handy in dealing with directories. Typically, users request a file when they specify a URL to a Web client, for e.g., http://machine@company.com/homepage.htm. In this case, the Web server will serve the file to the Web client if the file exists. Now consider the case where the user specifies a directory to the Web client, for e.g., http://machine@company.com/directory. The Web Server handles this case in one of two ways:

Setting Up Your Own Web

Perusing the files that make up the sample Web can help you understand how to set up your own Web documents and other files. Once you have composed your Web files, you are ready to reconfigure the Web server to make it serve files from your Web rather than the sample Web. All you need to do is to specify the Document Root Directory in the Web Server Configuration dialog box. This dialog box can be activated from the Configure... menu option in the Settings menu. Recall that the Document Root Directory is the directory where your Web starts. Specify this and click OK in the dialog box. The Web server is now ready to serve your documents and files from your very own Web. (Note: You can change the other parameters in the dialog box if you want to, but this is not necessary.)

Web Server MIME Types

Web Servers need to be able to tell web clients what kind of files the server will be sending them (sound, images, movies, etc). This is done via Internet standard MIME types.

All common MIME types are automatically configured when Web Server is run for the first time. In 32 bit versions of the web server, you may add new mime types by adding new key values to Windows' registry at: \HKEY_LOCAL_HARDWARE\SOFTWARE\NETMANAGE\MIME. In 16 bit versions you can add new values in the [Suffixes] section of the NMMIME.CFG file in the web server installation directory.


CGI Back End

The Web Server provides CGI support via a CGI-BIN directory. This directory is, by default, located in the same directory as W3SERVER.EXE - you may change this location by defining the following key value in Windows' registry: where [cgi-bin path] is the path to the directory containing CGI scripts and executables.

By default, Personal Web Server will run any .BAT, .CMD or .EXE that is located within the CGI-BIN directory. The URL to execute these CGI utilities will be in the form of: http://HOST:PORT/cgi-bin/SCRIPT.EXT, where SCRIPT.EXT is the CGI utility with the appropriate extension.

The 32 bit versions of this Web Server also support the use of PERL scripts. This requires that a compatible PERL interpretter be installed on your system. Byt default, the perl shell should be called PERL.EXE and be in the system's path.

If the interpretter has a different name. or if you wish to use other shell interpretters, you can add CGI shells to Web Server by adding key values to Windows' registry:

where [.ext] is the extension of the CGI script and [shell path] is the path to the shell interpretter.

NetManage's Web Servers support all the standard CGI Variables.


ISAPI Back End

The Web Server provides support for the Internet Server API (ISAPI) interface. ISAPI is an alternative to CGI that uses in-process DLLs, instead of spawning external applications or scripts.

The Web Server caches the DLL, so that it need only be loaded into memory once, giving you the best possible performance. The Web Server implementation of ISAPI allows DLLs to read and write directly from sockets, rather than standard i/o, and supports fast queries for common CGI variables, rather using system environment variables.

To use an ISAPI DLL, put it into your CGI-BIN directory and use the following URL format: http://HOST/cgi-bin/MY_ISAPI.dll/path?args

Sample ISAPI DLLs are available from 3rd party vendors.


Web Server Access Log Files

The NetManage Web Server automatically generates access log files which record the time, address and files accessed on the server.

Each port generates it's own access logs, and stores them in the same directory as W3SERVER.EXE - the name of the log is W3Sxxx.LOG, where xxx is the port number. The path to this file is available via LOG_HTTP CGI variable.

Web Server will attempt to resolve and record the remote host name in the access log if DNSLookup is enabled. To enable DNSLookup, add the following Windows' REG_DWORD registry key: HKEY_LOCAL_MACHINE\SOFTWARE\NETMANAGE\W3SERVER\General\DNSLookup, and set it to 1.

If DNSLookup is not enabled, the remote host's IP address is recorded.


Running Web Server as an NT service

The NT Server version of NetManage's Web Server can be run either as an application, or as an NT service. To run the server as an app, just run W3SERVER.EXE; To run as a service, use the following command line options:

The advantage of running the server as an NT service is that it will automatically restart when NT is rebooted, even when no one is around to login -- as when the power goes off.


Web Server Security

The Win95, NT and NT Server versions of this Web Server support an early implementation of Basic Authentication. This allows the administrators of the Web server to limit the access of certain directories and CGI files to authorized users.

The Security button on Web Server's configuration dialog is used to define server administrators. The first time the security button is used, the administrator is prompted for a Root Administrator name, password and password verification. The Root Administrator is authorized to add new Server Administrators and Users.

For more information on adding administrators, users and setting up Basic Authentication, please read Web Server's Security documentation.