[ Go to September 1997 Table of Contents ]|
-- by David W. Methvin
Conjure up a picture of a Web server, and the image you probably get is a beefed-up system running a serious network operating system like Windows NT or UNIX. To run a Web site over either OS, you'd need a high-end Intel Pentium system with 32MB or more of RAM. But if you're just starting to explore Internet or intranet development, it's hard to justify that kind of hardware investment unless you're sure the technology works for you.
There is, however, an economical alternative: Microsoft Personal Web Server (PWS) for Windows 95. In essence, it's the little brother of Internet Information Server (IIS), which comes with Windows NT 4.0. Although PWS doesn't offer the performance of IIS, it does offer nearly all of the IIS functionality. Since PWS runs on Windows 95, you can set up your server on a modest-even downright ancient-PC.
PWS makes sense for a small-office intranet. Windows 95 running PWS can easily handle the light load placed on an intranet by an office of 20 or so users. PWS is also a great test bed for application development destined for a larger intranet or Internet site. Because PWS supports CGI (Common Gateway Interface) and Internet Server application programming interface (ISAPI) applications, you can test apps on it before testing or deploying them on a larger server.
There are two ways to get PWS, but whichever way you choose, it won't cost you a dime. You can download it from Microsoft's Web site (http://www.microsoft.com/ie/download). If you don't mind waiting a few months, you can also get PWS as part of the next version of Windows, code-named Memphis but most likely to be called Windows 98.
Besides being an economical solution, Personal Web Server is also easy to install.
The good news is the software is free. The better news is you won't need much hardware, either. To see just how little we could get by with, we put together an intranet server using a six-year-old AST 486/33 with 10MB of RAM. You wouldn't think of using this kind of system as your main PC nowadays, but it worked perfectly well as a dedicated intranet server for a small office. This system served up Web pages over an intranet faster than you're likely to experience when cruising Internet sites through a 33.6Kb-per-second modem.
If you don't have an old system lying around, you can run the intranet on a PC as a background task. That's an especially good approach when the person using that PC also maintains the intranet. The intranet files are stored on the Webmaster's hard disk, and everyone else on the network has only read access through their Web browser.
You might also want to put the Windows 95 intranet sever on a notebook PC. PWS works quite well there, even on older notebooks. It's particularly useful when you want to take a mirror copy of an intranet or Internet server with you on the road. A number of offline browser utilities let you take Web pages with you, but a portable server is better because it lets you run CGI or ISAPI applications as well.
One place you probably don't want to put PWS: the Internet. Windows 95 and the FAT file system aren't designed for security, so that reason alone makes PWS a bad choice for a public Internet server. Although PWS offers an option for user-based authentication, don't depend on it to keep the company's most vital secrets safe from the attacks of a determined system cracker.
Weaving a Web Server
Installing and running PWS is straightforward. Just run the setup program (or the self-extracting EXE file if you downloaded PWS from Microsoft's Web site), and PWS will install itself with the default settings. You need to reboot the system to get PWS started for the first time. When PWS installs the TCP/IP protocol as part of the setup, you might have to reboot twice before it will work properly; PWS seems to start before TCP/IP has fully configured itself. If you get error messages from PWS after the first boot, try booting again.
To make sure PWS is working fine, try this test. First, click on Control Panel's Internet icon, and then click on the Connection tab. Make sure the boxes labeled "Connect to the Internet as needed" and "Connect through a proxy server" are not checked. Then start Microsoft Internet Explorer or Netscape Navigator (any version) on the PC running PWS and type the URL http://127.0.0.1/into the Location or Address box. This should load the default PWS page into your browser. Then try http://pcname/, where "pcname" is the name of your PC from the Identification tab of Network properties. If that doesn't work, you may have some other configuring to do before you can access this PWS server. (See sidebar "Configuring TCP/IP for a Small Network.")
Before you start building intranet content, it's a good idea to take a look at how PWS is installed so you can decide whether you'd like to change the settings. It will be a lot easier to change things now than when you're well into building your intranet. When running, PWS displays an icon on the taskbar next to the clock. Double-click on this icon, and you'll get a set of property pages that let you do some basic operations such as starting and stopping the Web and FTP services. Although PWS offers the FTP service, it's usually easiest to use Windows' standard file sharing instead.
Most administration of the PWS service is done through a set of administrative Web pages. (See sidebar "PWS Command Post.") To get to the pages, double-click on the PWS icon on the taskbar and click on the Administration tab. If you haven't set up TCP/IP names yet, you may get an error message when the browser tries to load the Web page. However, you can still get to the administrative pages by using http://127.0.0.1/HtmlaScripts/htmla.dll?http/dir as the URL.
Although you can place your Web files in this default location, it's often better to keep the actual HTML files in a separate set of directories from the PWS program files. During installation, PWS places files in the C:\PROGRAM FILES\WEBSVR directory. If you want to accept the defaults, the default document for the intranet Web server will be C:\PROGRAM FILES\WEBSVR\DOCS\DEFAULT.HTM. The "PWS Command Post" sidebar shows an alternative setup, with your own pages and data stored in a separate set of directories under C:\WEBSHARE.
Now you're ready to build intranet Web pages. You can use a program as simple as Notepad to write your HTML or download a shareware HTML editor from the WINDOWS Magazine site. Most word processors now offer an option to save documents in HTML format, so you can create your pages in a familiar environment and take advantage of good editing tools and spell checking. If you'd prefer a commercial product for building Web pages, take a look at our WinList picks, Microsoft FrontPage 97 or NetObjects Fusion 2.
the PWS administrative Web pages show the power of PWS. Although they appear to be just forms in an HTML page, they are actually processed by an ISAPI DLL. This DLL generates different HTML pages depending on what data you enter in the form, or what buttons and links you click on. The DLL then makes the required changes to the PWS configuration.
If you're a developer, you can build applications that run on the PWS Web server. PWS can even use the Active Server Pages (ASP) technology introduced with IIS 3.0, but the ASP component doesn't come as part of the standard PWS package. You can download just the ASP component of IIS 3.0 from Microsoft's Web site at http://www.microsoft.com/iis and install it into your PWS setup. Once you've installed ASP, check out the sample pages that come with the package.
ASP and ISAPI are Microsoft's solutions for server-side programs, but PWS can also run programs using CGI. CGI was the Web's first standard way to run programs, and it works for just about any operating system or brand of Web server. For those reasons you'll find a lot of CGI programs and documentation on the Web. For some good starting points, look at http://www.winmag.com/web.
Try Perl at your Peril
Many CGI programs are written in Perl, a powerful interpreted language with a unique syntax. We wouldn't recommend Perl for a programming novice, but experienced programmers will appreciate its power in text manipulation and pattern matching. You can get a free copy of Perl for Windows (NT or 95) at http://www.activeware.com.
One word of caution: All of these server-side programming technologies can take a lot more CPU time and memory than what's required to simply serve up static HTML pages. Don't expect a really low-end PC to be able to handle large CGI programs or Active Server Pages.
You don't have to venture into server-side applications to benefit from running a Web server on your own PC. Many desktop applications now have options to write their information in HTML format, and you can save that format to a directory accessible to PWS. For example, Microsoft Schedule+ has an option to save a view of your schedule to HTML. If you save that HTML file to your Web directory, other users on the intranet can see when you'll be available.
An intranet Web server is a natural place for documents commonly tacked up on cubicle walls, such as phone lists and company policies. People can still print out a copy and put it on the wall, but they'll also know where to find the most recent version.
SIDEBAR: Configuring TCP/IP for a Small Network
TCP/IP is the lingua franca network protocol for intranets and the Internet, so you'll need at least some familiarity with it to get a PWS Web server running.
Before you change your networking configuration, record your current network settings so you can set things straight if anything goes wrong. You'll find quite a few settings in the TCP/IP stack, so it might be easier to capture each dialog with Print Screen and save them as bitmap files. Then you can see what the configuration looked like before you started.
Another word of warning for anyone connected to a corporate network already using TCP/IP: Talk with your network administrator about configuring your PWS system. Most corporate networks connect to the Internet through a firewall that keeps users from outside the company from accessing your PWS server. But it's a good idea-both technically and politically-to discuss security and access considerations with your company's network folks.
If you install PWS on a system that doesn't have TCP/IP installed, the PWS installation process will add TCP/IP to your network protocol stack. You'll need to have your Win95 CD-ROM or diskettes handy, or have the Win95 files in a local directory.
You may find that TCP/IP is already installed, but only connected to the Dial-Up Adapter-a configuration that's most often used for dialing into an ISP. If the PC is a standalone system, that's really all you need. But if the PC has a network card and you want other network users to access PWS, you'll need to bind TCP/IP to the network card by selecting the Network icon in Control Panel.
Each computer in a TCP/IP network must have a unique IP address. The public Internet and large corporate networks typically use a protocol named Dynamic Host Configuration Protocol (DHCP) to assign and track IP addresses. DHCP complicates things on a small network that isn't connected to the Internet. It's much easier to enter a fixed IP address into the network configuration. You can track which number goes with which PC by using the HOSTS file described below.
Names and Addresses
TCP/IP communicates with computers using IP addresses, such as 192.168.0.3. However, it's easier to remember names, like www.winmag.com. In the Internet or a large corporate network, a protocol called the domain naming system (DNS) is used to convert a computer name like www.winmag.com into an IP address such as 192.168.0.3. It's overkill to use the DNS on a small network; you should use the Windows 95 HOSTS file instead.
To use the HOSTS file, start Notepad or another editor that creates ASCII files. In the file, type the name of the computer, a space and the IP address. Use only one name-address pair on each line. The safest IP address to use is 192.168.0.x, where x is a unique number between 1 and 255. By convention, IP addresses starting with 192.168 are not routed onto the public Internet, so they won't conflict with anyone else's IP addresses. (If you have more than 255 computers on your network, you shouldn't be using a HOSTS file!) When you're finished, save the file as "HOSTS" in the Windows directory. Make sure to use the quotes, or Notepad will create HOSTS.TXT instead. (You can rename the file to remove the extension if necessary.) Copy the HOSTS file to the Windows directory of each PC on the network.
The screenshot below shows the HOSTS file we used for our testing. We used the same name as the Windows 95 computer name, shown under the Identification tab in Control Panel/Network. The computer name doesn't have to match the IP host name, but if it doesn't, it can be confusing to humans.
Notice a few special entries in the file. The pound sign (#) turns lines into comments, which Windows 95 ignores. The name "localhost" and the address "127.0.0.1" always refer to the local system, which can be useful when you want to refer to the PWS running on the current PC. Finally, notice the Internet-like name www.winmag.com that has the same address as the PC named Liberty. It's okay for a single system to have multiple names. In this case, you might do it to test an Internet server before deploying it on the Internet. Wherever we use the name www.winmag.com-for example, in a Web browser-Windows95 TCP/IP will resolve it to 192.168.0.3 and send the message on to the machine named Liberty.
If you're having problems getting PCs to talk with each other using TCP/IP, one useful debugging tool is Winipcfg in the Windows directory. Use Start/Run to launch Winipcfg, and it will tell you how this PC's IP protocol stack is configured. Another convenient tool is ping. At a command prompt, type ping 192.168.0.1 (or whatever address you want to test). If you can ping a system, it means that the basic network setup (network card, wiring and TCP/IP stack) is functioning properly. If you can ping a computer but can't connect otherwise, it's most likely a software configuration problem; double-check the HOSTS file and the IP address you placed into the Control Panel Network setup.
SIDEBAR: Web Server Resources
Updated information and more links on this subject can be found at http://www.winmag.com/web.
Personal Web Server: http://www.microsoft.com/ie/download
Active Server Pages: http://www.microsoft.com/iis (Go to the IIS download area and uncheck all options except the Active Server Pages component.)
Perl 5.0 for Windows: http://www.activeware.com