-->
Previous Table of Contents Next


Chapter 50
Setting up a Gopher Service

by Tim Parker

In This Chapter
•   Gopher and Linux
•   Configuring Gopher
•   Setting up your Gopher directories
•   Starting Gopher
•   Letting the world know

Gopher is one of the most useful Internet services available because it is widely used by beginners and veterans alike. Gopher is a text-based file location system that leads you through a series of hierarchical menus to find specific files you want. Setting up a Gopher site is basically just a matter of configuring the Gopher server software and creating a number of logical directory structures with files indexed in a Gopher format.

Gopher works by having a client program (started by a user) connect to a Gopher server and retrieve information about files available on the Internet (or local area network, if the Gopher server is limited to that area). At the end of 1995, there were more than 6,000 Gopher servers on the Internet, all accessible by anyone with a Gopher client. Although the number has dropped a little since then (primarily because the World Wide Web has replaced some sites), there are still a lot of Gopher sites. Those servers contain information about more than 10 million items ranging from text files to movies, sounds, images, and many types of application binaries. Gopher enables you to display and manipulate lists of files, looking for items of interest to you.

If you or the users of your Linux system want to connect to another Gopher server, you need a Gopher client. There are several clients available with Linux distributions, on FTP and BBS sites, and through several other sources. If you don’t want to allow users (or yourself) to start a Gopher client, you can use Telnet to connect to sites known as public Gopher clients. These sites allow you to log in as an anonymous user and access the Gopher system. Most Gopher client packages offer more than just Gopher programs. Typical Gopher clients enable you to access WAIS indexes, use FTP, and to some extent, interwork with the World Wide Web.

This chapter looks at how you can set up a Gopher server, allowing others to access your machine’s Gopher listings. Although we won’t go into detail about how you should structure your Gopher service, you will see how to configure your software.

Gopher and Linux

There are currently two versions of Gopher available for Linux systems: Gopher and Gopher+ (Gopher Plus). Gopher is freely available, but Gopher+ is a commercial product. The difference between the two is functionality. If the additional capabilities of Gopher+ are important to you and your Gopher site, you may want to consider purchasing the product. Essentially, Gopher+ adds the following features:

  Makes extended file information available
  Offers a description of a file
  Retrieves multiple versions of a file at one time (such as ASCII and PostScript simultaneously)
  Allows file retrieval based on search criteria determined by the user

Gopher+ works with Gopher, but Gopher cannot use the advanced features of Gopher+. Gopher+ and Gopher both work with WWW browsers. Gopher+ licenses tend to cost from about $100 to $500, depending on the site’s conditions.

The versions of Gopher usually offered with Linux come from one of two sources: University of Minnesota Gopher and Gopher+, or GN Public License Gopher. The most recent public version of UM Gopher is version 1.3 (version 2.13 is free only to educational institutions), but the university is no longer working on the freeware Gopher product, instead concentrating on the commercial Gopher+ product. The GN Public License Gopher includes a WWW service but does not provide full functionality at present.

Gopher uses a TCP/IP family protocol known, surprisingly enough, as the Gopher protocol. This is a fairly simple request-answer protocol that is implemented for speed. When Gopher transfers information about a file it knows about (called a Gopher menu file), it follows a set format. The format used by Gopher is:


<type><display_name><selector string><hostname><port>

The fields in the Gopher menu file have the following meanings:

  type—A one-character description of the item (see the following bulleted list for valid codes).
  display_name—The menu or display name, followed by a tab character.
  selector_string—A unique identifier for a document on each server (usually based on the filename). The selector string is followed by a tab character.
  hostname—The host where the file resides, followed by a tab character.
  port—The port to access the host, followed by a carriage return/line feed pair (usually port 70).

The Gopher+ version of the system adds a few new attributes to each line, including the name of the system administrator responsible for the service, a simple description of the document type (text, for example), the language the file is written in, the last date the file was updated, and the size in bytes.

When a user wants to retrieve a file through the Gopher system, the hostname and port are used to create the connection to the remote server, while the selector string can be used to identify the file to be downloaded.


Previous Table of Contents Next