GOPHERD.CONF(1)

NAME
gopherd.conf - configuration file for gopherd(8)

DESCRIPTION

The gopherd.conf file contains a list of directives that alter the behaviour of the gopherd(8) server. It is composed of lines of the form:

    Token: Value

Tokens are case insensitive and the value field will change, depending on the token. A pound sign at the beginning of a line signifies a comment line. Quick pseudo grammer

    hostalias: <DNS alias name> ext: <extension> <Gophertype> <Prefix> <Gopher+Type> Bummermsg: <message> site: <domain name|ip fragment|"default"> <[!](browse|read|search)+>

The following tokents are recognized

hostalias:
    changes the hostname that is returned by the server. This is useful when the gopher server is defined by a CNAME record in the DNS system.

ext:
    maps a filename extension onto a particular gopher type. The first parameter is a case insensitive extension like .gif. The next parameter is the single character gopher type (1,0,I,etc...) The third parameter is a prefix that will be appended to the normal filename path.

ignore:
    specifies a filename extension to ignore completely. Files matching the ignore criteria are never presented to the gopher user. However, ignoring files does not protect them from prying eyes.

BummerMsg:
    specifies a message that will be presented to the client when access is denied.

access:
    allows you to set who can browse directories, read files, and search your system. The first parameter is a domain name component (like special key "default" The second parameter is a list of comma separated words defining the access for the particular match, optionally beginning with a negation character (!). The three words that define access levels are "browse", "read", and "search". For instance, to allow reading and browsing, but not searching specify "read,browse,!search" for the second parameter. If you're using the site access system, you'll want to set the default access level *first*. All following entries inherit the default that you set. For instance, if your default is "!read,!browse,!search' and you want to turn on browse access for a certain machine you can just specify "browse", not "!read,browse,!search"

Sample gopherd.conf file

     #
     # The name we want to be known as
     #
     hostalias: gopher.turnip.com
     #
     # Extension mapping
     #
     ext: .hqx 4 0 HQX
     ext: .gif I 9 GIF
     ext: .pcx I 9 PC_Paintbrush
     ext: .pict I 9 PICT
     ext: .tiff I 9 TIFF
     ext: .jpg I 9 JPEG
     #
     ext: .au s s U-law
     ext: .snd s s U-law
     ext: .html h GET /h WWW
     ext: .src 7 waissrc: WSRC
     ext: .tar.Z 9 9 TARZ
     ext: .zip 5 9 PKzip
     ext: .zoo 5 9 Zoo
     ext: .arc 5 9 Arc
     ext: .lzh 5 9 Lharc
     ext: .exe 5 9 PC_executable
     ext: .ps 0 0 Postscript
     #
     # filename extensions to ignore
     #
     ignore: lost+found
     ignore: lib
     ignore: bin
     ignore: core
     ignore: tmp
     ignore: etc
     ignore: usr
     ignore: hate_mail_to_paul
     Bummermsg: No access for turnip infidels!
     # Don't allow anyone to read or browse us,
     # anyone can search though.
     access: default !browse,!read,search
     #
     # allow any hostname that ends with
     # turnip.com to browse and read
     #
     access: .turnip.com     browse,read
     #
     # Allow anyone on a class C network
     # (starting with 192) to browse
     #
     access: 192.    browse
     #
     # Allow anyone on the 128.101.193 network
     # to read from us.
     #
     access: 128.101.193      read
     #
     # Turn off searching for these bozos
     # they can't do anything
     #
     access: bozo.org    !search