In this chapter, you learn how to integrate two traditional TCP/IP network services that pre-date the World Wide Web, but that can nonetheless be important to your customers. As noted earlier, the developers of Web technology took care to build support for a number of older network services into the HTTP protocol, integrating these services into Web browsers and servers. Because you established a TCP/IP networking infrastructure for your Intranet, you easily can use these older services in it, using mostly free software.
This book began by arguing that problems of differing-and difficult-to-master-user interfaces to older networking services were prime movers in the development of the Web. Of course, the existence of the Web doesn't mean those older services no longer have value. E-mail, FTP, Gopher, Archie, WAIS, and other such services remain at the heart of the Internet.
Earlier, you saw how a Web-based front end to the Archie file-locator service vastly simplified a difficult interface, making it accessible to non-technical users. You'll learn in this chapter how you can use FTP and Gopher services in your Intranet and provide Web-based front ends to them for your customers. In doing so, you'll substantially expand the range of services available on your Intranet without requiring significant customer training.
Support for each of these services is built into both the Web network protocol and your customers' Web browsers. Integrating them into the Intranet you started building in Chapter 7, "Running the Intranet Web Server," will provide new and powerful services to your customers, making your Intranet even more valuable.
You learned in Chapter 7 how Web servers and browsers use the MIME mechanism to identify data by MIME data types/subtypes. Also, you learned that Web servers include this identifying information in MIME data type/subtype headers when sending data back to a Web browser. You may have wondered, then, why Web browsers also have to be configured with MIME information if they already receive it from the server.
This is a good question, and the answer is fundamental to the information in this chapter. Although MIME data type/subtype information coming from a Web server may indeed be redundant to the properly set up browser, Web browsers also communicate with other kinds of Internet information services, such as FTP and Gopher. These Internet services pre-date both the World Wide Web and MIME, so they don't know anything about MIME types. Moreover, because they send back only one kind of data, not one of many kinds of data like a Web server does, they have no reason to provide any identifying information. An FTP server sends and receives data using only the FTP protocol; likewise, Gopher servers use only the Gopher protocol. These servers respond to clients by sending out data; the clients have to figure out what to do with the data. Naturally, stand-alone FTP and Gopher client software do know what type of data to expect.
Fortunately, Web browsers deal with FTP and Gopher data too, and they can use the MIME mechanism to enhance their handling of the data, even in the absence of any incoming identifying information. As mentioned before, the HyperText Transfer Protocol (HTTP), which is the Web protocol, has support for a list of older Internet services built in. This support includes both FTP and Gopher, as well as several others. Your Web browser automatically senses when it's speaking with an FTP or Gopher server and acts accordingly. As far as you're concerned, though, you're just pointing and clicking, just as you would when dealing with a Web server. If you want to retrieve a file, you just click its hyperlink. Your browser identifies the incoming data and handles it properly.
You've no doubt noticed that your Web browser often dresses up the display of FTP and Gopher server listings with identifying icons. File folder icons represent directories; other icons identify plain text and binary files. Normally, FTP servers are completely text-based, with no graphical displays. Because an FTP server, for example, has no way of telling a Web browser what sort of data is coming, Web browsers use a workaround, keying off the filename extension to a MIME data type/subtype. The set of canned icons representing different file types that you see when you connect to an FTP or Gopher server does not come from the server. Rather, these icons are a result of your browser's MIME mechanism using the filename extensions and a built-in list of MIME data types/subtypes.
Netscape, Mosaic, and Internet Explorer support a long list of
standard MIME types/subtypes for communicating with non-HTTP services,
such as Gopher and FTP. The browsers use a built-in set of generic
icons to represent them. Table 9.1 shows a partial list of MIME
types available in Netscape.
Content Type | Extensions | Description |
text/plain | txt, text | Plain Text |
text/html | html, htm | Hypertext Markup Language |
application/rtf | rtf | Rich Text Format |
application/x-tex | tex | TeX Document |
application/x-latex | latex | LaTeX Document |
application/x-dvi | dvi | TeX DVI Data |
application/x-texinfo texi | texinfo | GNU TeXinfo Document |
image/gif | gif | CompuServe Image |
image/jpeg | jpeg, jpg, jpe | JPEG Image |
image/tiff | tiff, tif | TIFF Image |
image/x-cmu-raster | ras | CMU Raster Image |
image/x-xbitmap | xbm | X Bitmap |
image/x-xpixmap | xpm | X Pixmap |
image/x-xwindowdump | xwd | X Window Dump Image |
image/x-portable-anymap | pnm | PBM Image |
image/x-portable-bitmap | pbm | PBM Image |
image/x-portable-graymap | pgm | PGM Image |
image/x-portable-pixmap | ppm | PPM Image |
image/x-rgb | rgb | RGB Image |
image/ief | ief | |
application/fractals | fif | Fractal Image Format |
audio/basic | au, snd | ULAW Audio Data |
audio/x-aiff | aif, aiff, aifc | AIFF Audio |
audio/x-wav | wav | WAV Audio |
video/mpeg | mpeg, mpg, mpe | MPEG Video |
video/quicktime | qt, mov | Quick Time Video |
video/x-msvideo | avi | Microsoft Video |
video/x-sgi-movie | movie | SGI Video |
application/mac-binhex40 | hqx | Macintosh BinHex |
application/x-stuffit | sit | Macintosh Archive |
application/x-zip-compressed | zip | Zip Compressed Data |
application/x-shar | shar | UNIX Shell Archive |
application/x-tar | tar | UNIX Tape Archive |
application/x-gtar | gtar | GNU Tape Archive |
application/x-cpio | cpio | UNIX CPIO Archive |
application/octet-stream | exe, bin | Binary Executable |
application/postscript | ai, eps, ps | Postscript Program |
application/x-csh | csh | C Shell Program |
application/x-sh | sh | Bourne Shell Program |
application/x-tcl | tcl | TCL Program |
application/x-troff | t, tr, roff | TROFF Document |
application/x-troff-me | me | TROFF Document |
application/x-troff-ms | ms | TROFF Document |
application/x-troff-man | man | UNIX Manual Page |
encoding/x-compress | Z | Compressed Data |
encoding/x-gzip | gz | GNU Zip Compressed |
You can use Netscape to view this list and the associated icons
at http://www.netscape.com/assist/helper_apps/mimedefault.html.
Tip |
Web browsers' built-in lists of supported MIME types/subtypes rely solely on filename extensions when dealing with Internet services such as FTP that don't provide MIME header information. Because people are free to name files anything they want, you may encounter files on the World Wide Web that are misidentified by your browser because they've been given an extension that conflicts with your browser's built-in list. Make sure you use consistent filenaming conventions in your Intranet, following your browsers' built-in lists, to ensure that your customers don't encounter files that their browsers can't identify. |
The TCP/IP file transfer protocol (FTP) is one of the Internet's
mainstays. You probably used FTP to download your first Web browser
software. On UNIX, FTP is a text-based application and is not
particularly user-friendly for the uninitiated. Windows NT and
Windows 95 also include a command-line FTP client. But you don't
have to bother with those because the CD-ROM with this book includes
an excellent 32-bit GUI FTP client, named WinFTP.
Sams.net and I obtained permission to include WinFTP just as this book was going to press. Before learning of this, this chapter had already been written including the instructions for installing and using another fine GUI FTP client named CuteFTP. Most of the information in this chapter about the FTP client program is directly applicable to WinFTP as well as CuteFTP. And of course, the information about the FTP server will work regardless of your choice of the FTP client program. CuteFTP is available for free download from the Internet. |
To download and install CuteFTP from the CD to your hard drive, follow these steps:
Tip |
The file cuteftp.exe is a 16-bit version of CuteFTP for use with Windows 3.1 or 3.11. On Windows NT and Windows 95 machines, you can safely delete this file to save disk space. |
You now have one of the best FTP client applications available to assist you with file transfers.
To use CuteFTP, you need a connection to the Internet. The first thing you will see when you run CuteFTP is the FTP Site Manager shown in Figure 9.1.
This dialog shows the predefined addresses of several anonymous FTP sites. You can easily add new sites to these folders or edit the information about existing sites. To see how this software works, try to visit the Microsoft site to download the latest version of Internet Explorer. (By the time you read this, IE version 3.0 should be available and you may want to download it in case it isn't included on the Windows NT 4 CD-ROM.)
Figure 9.3: Dragging the file from the right window to the left window will initiate the download.
CuteFTP keeps you notified of the file transfer progress in the
status bar.
Note |
Now that you've seen how easy it is to download a file from a remote system, you already know how to upload a file to a remote system. Basically, it is just a matter of dragging a file from your local drive (the window on the left) to the remote drive (the window pane on the right). |
One other trick you might like to know about CuteFTP is how to set the default directories on the local and remote systems when a connection is established. Then you won't have to waste any time navigating the directory structures in either window pane. This trick requires you to edit the profile of the FTP site. If, for example, you wanted to edit the profile for the Microsoft site, you would perform these steps:
Figure 9.5: Visiting the Microsoft FTP site with Navigator.
Tip |
You can leave the userid and password blank for anonymous FTP sites. |
To download that same file with the FTP feature built into Netscape Navigator 2.x, perform the following steps. A similar process would apply to any Web browser that your customers might run on your Intranet.
Tip |
You can save the time of scrolling through the directories in Step 2 if you initially enter the complete URL ftp://ftp.microsoft.com/Softlib/MSLFILES/: |
Whether you use your Web browser or CuteFTP, you will find that knowing how to copy Internet/Intranet files with FTP is a very handy process to be familiar with.
You may have software or other data that you would like to make widely available to your customers. Setting up an FTP server on your Intranet makes this process easy. If you have Windows NT Server and IIS on your Intranet, you already have FTP server software you can use. Setting it up is fairly simple. Most of your customers will access your FTP server using their Web browsers, so they won't need to learn about FTP, or even know that they're accessing an FTP server, in order to download files.
Probably the best way to use your Intranet's FTP server is as a distribution point for Web-related software, including both browser and server software. Not only can you make it easier and faster for your customers to get the latest copy of Internet Explorer (or Netscape, if you've licensed it), but you'll also take a major load off your company's Internet connection by downloading the software from the outside once, and then having local copies of the software available on the Intranet. Your network administrators will thank you for reducing the load on their Internet link, and your customers will thank you for faster service.
You'll also do a good deed for the online community by relieving the load on the FTP server where the original software resides. Whenever a new release becomes available, you can grab a copy and make it instantly available for your customers. Major anonymous FTP servers like FTP.ncsa.uiuc.edu, home of ncSA Mosaic, are invariably very busy in the days immediately following a new release of Mosaic. Accesses are often denied when the system is too busy to handle all the requests for copies of the new software release.
Similarly, you can redistribute Web server software for those of your customers who may want to set up another server and make it part of your Intranet. Your FTP server is a good place to store libraries of image files for use in HTML markup for much the same reason. Be sure, however, that you read and follow licensing restrictions on the redistribution of copyrighted software, including shareware.
If you worked through the steps in Chapter 7 to set up the WWW Service with IIS, you should have a very easy time setting up the FTP Service in this section and the Gopher Service later in this chapter.
To configure the FTP server, follow these steps:
Now you just need to add the files that you want to make available
to your customers to the <Home>
directory.
Note |
Internet Security Systems in Norcross, GA maintains a Frequently Asked Questions (FAQ) document about anonymous FTP setup. To grab a copy of this document, use your Web browser to go to http://iss.net. Most of the information is written with a UNIX slant, but you should still find it useful for Windows NT networks. In case you want to make your anonymous FTP server available on the Internet, the Anonymous FTP FAQ also tells you how to register it with the Archie service. |
Because setting up anonymous FTP creates a walled-off file system
dedicated to your FTP server, you'll want to set up a directory
structure that corresponds with the data you're distributing.
Use the server's <Home>
directory as the top of your file tree, with additional directories
created within it based on your Intranet's needs.
Tip |
Some people use the same file tree for their anonymous FTP and Web servers, putting the anonymous FTP file tree within the HTML document root file tree. This structure can make maintenance of both your Web server and your anonymous FTP server more convenient. You need to watch your directory and file permissions, though, to ensure you don't disable with one server the security you may have set up with the other. This issue is particularly relevant if you set up password-protected portions of your Web server tree, a subject covered in more detail in Chapter 10. The default installation of IIS creates separate root directories for WWW, Gopher, and FTP. |
Before the World Wide Web burst onto the Internet stage in 1993, the sexiest Internet technology was something called Gopher. Developed at the University of Minnesota (whose athletic teams are nicknamed the Golden Gophers), Gopher was the first successful attempt to join several existing TCP/IP networking technologies into a single, easy-to-use interface.
The main Gopher interface is a plain text menu of choices. You start out at a top-level menu and work your way down a hierarchy of nested menus until you find the subject you're after. Once you find your subject, you're able to view text files on-screen and, in some cases, transfer files across the Internet to your own computer. Selecting a Gopher menu item can do one of several things:
The last two items are key to Gopher's success. By selecting a menu item, you can move transparently from one Gopher server to another one. You don't have to know anything about how to get there, the second server's Internet address, or anything else. Even more importantly, Gopher incorporates preexisting Internet services such as Telnet and FTP. As a result, you can access a remote computer for login and terminal emulation, or transfer a file using FTP, just by selecting a Gopher menu item.
If you're thinking that Gopher is beginning to sound a lot like
the World Wide Web, you're right on target. You can do many of
the same things with Gopher that you can do on the Web, such as
jumping transparently from one computer system to another, accessing
other Internet services, and even searching Gopherspace. Gopher
can be seen as the Web's most immediate ancestor, with many of
the same capabilities in a non-graphical interface. The Web's
HTTP protocol reflects this ancestry: Gopher is one of many Internet
services that is built into the World Wide Web. You can use your
Web browser to access Gopher services.
Note |
The graphical icons shown in Gopher listings don't come from the Gopher servers. Rather, your Web browser, using the MIME mechanism and its built-in list of filename extensions/MIME type/subtype associations, generates them to dress up the display. |
If you can do everything with your Web browser that you can do with a Gopher client, you may well wonder why you would want to bother with running both on your Intranet. Gopher services have limitations not present in the Web. Most notably, you can't include graphics and hyperlinks within Gopher documents. Therefore, you can't jump directly from one document to another, though you can jump using Gopher menus. Nonetheless, there are some strong reasons for you to consider setting up Gopher services as part of your Intranet.
The primary reason is that Gopher's strongest suit is plain text
files. You don't have to learn the HTML markup language, and setting
up a Gopher server is substantially easier than setting up a Web
server. Gopher is a favorite with many U.S. Government agencies
for just these reasons. The Government generates vast quantities
of plain text documents, and it's quite easy to hook them into
a Gopher server. Indexing plain text files (with WAIS or other
indexing tools) is easy, and Gopher can search the indices that
these tools create. If a lot of the data you plan to make available
on your Intranet is plain text data, Gopher is for you. You may
not even need a Web server and all the time and trouble of converting
documents, as described in Chapter 7. There
is little reason for you to learn HTML and how to convert image
data if your data is plain text and you have no images to use.
Tip |
The inevitable FAQ document about Gopher is at gopher://mudhoney.micro.umn.edu/00/Gopher.FAQ. |
If you implemented the steps in Chapter 7 to
set up the IIS WWW Service and the steps in the previous section
to configure the IIS FTP Service, you already know everything
you need to know about the IIS Gopher Service. You see, Microsoft
implemented the WWW, FTP, and Gopher Services in IIS so similarly
that once you have learned how to configure any one of the servers,
configuring another one is quite easy.
Note |
This chapter focuses mostly on the Microsoft IIS FTP and Gopher Services. As of this writing, IIS requires NT Server. If you are using NT 4 Workstation and you want to run an FTP or Gopher server, you still have options. The CD-ROM with this book includes the freeware EMWAC Gopher server. You might also want to consider the Serv-U FTP server for a very reasonable $20 shareware registration fee (send e-mail to: RJB@eel-mail.mc.duke.edu for more information). |
To configure the Gopher server, follow these steps:
Figure 9.8: Configuring the IIS Gopher Service properties.
The final step in getting your Gopher server ready for your customers is to create Gopher links. Links are the items you place on Gopher menus that enable the user to jump from one place to another. A link can point to one of the following:
Tip |
See the IIS help files for more information about creating Gopher links and menus. The section titled Setting Up Tag Files contains important information about the gdsset command-line utility. The gdsset utility creates hidden files that you place in the Gopher directories on your server. |
This chapter has covered two of the major TCP/IP networking services that can add value to your Intranet. Your customers can access these services by using their World Wide Web browsers, and they can extend your Intranet to make it more useful to your company or organization. Although they both function as stand-alone network services, putting a Web-based front end on them can make them easy to use. In this chapter, you have done the following:
Don't think of these services in isolation. You can combine these services in imaginative ways to create truly unique and valuable additions to your Intranet; examples include using WAIS to index e-mail distribution list archives for subsequent search and retrieval, using Web fill-in forms, and using CGI-bin gateway scripts. These potential combinations of service, using Web browser front ends, constitute more than the simple sums of their parts; they create new, powerful applications for your Intranet.
Chapter 10 deals with Intranet security issues. Although your objective in setting up an Intranet is to make information available to your customers, you'll want to pay attention to its security, particularly if any part of your Intranet is accessible to the Internet. In addition, implementation of some Intranet security features can enhance the value of your Intranet's services.