Timm Murray > Apache-GopherHandler-0.1 > Apache::GopherHandler

Download:
Apache-GopherHandler-0.1.tar.bz2

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.1   Source  

NAME ^

  Apache::GopherHandler - Gopher protocol implementation for Apache2

SYNOPSIS ^

 # In your Apache2 configuration
 <VirtualHost _default_:70>
        DocumentRoot /home/www/data/gopher
        
        <Perl>
                $Apache::GopherHandler::Config{doc_root} = '/home';
                $Apache::GopherHandler::Config{server}   = 'localhost';
                $Apache::GopherHandler::Config{port}     = 70;
                $Apache::GopherHandler::Config{handler}  =
                        'Gopher::Server::RequestHandler::File';
        </Perl>
        PerlModule                    Apache::GopherHandler
        PerlProcessConnectionHandler  Apache::GopherHandler
 </VirtualHost>

DESCRIPTION ^

One of the earliest goals stated in the Gopher Manifesto (http://27.org/gopher-manifesto/) was to have an Apache plugin that would run a Gopher server. So here it is.

This requires Apache2/mod_perl. Sorry. The first version of Apache is too HTTP-centric. In Apache2, the project moved twards a more generalized server that was modular enough to support other protocols. Without that, making Gopher available on Apache servers would have been impossible, or at least very difficult.

For the moment, this isn't a very full-featured server. If you want a stand-alone Gopher server, you're probably better off using PyGopherd (http://gopher.quux.org:70/devel/gopher/Downloads/pygopherd). If you want to convert an existing Apache2 server into something that can support Gopher and you don't care about (or can wait for) some fancier features, then this will work fine.

This relies on the Gopher::Server module to take care most of the implementation details of the protocol. Apache::GopherHandler provides the glue between that module and Apache.

CONFIGURATION ^

The best way to run Apache::GopherHandler is inside an Apache <VirtualHost>. Actual configuration is done either inside a <Perl> directive or your Apache startup file. This is done by accessing the hash %Apache::GopherHandler::Config. Keys can be specified here that will be passed to the Gopher::Server::Requesthandler you specify in the handler key. Currently, only Gopher::Server::RequestHandler::File is supported (but this will change).

At a minimum, the following keys are needed:

handler

The Gopher::Server::RequestHandler class to use. Default: Gopher::Server::RequestHandler::File

server

The hostname of the server. Default: localhost

port

The TCP port of the server. Make sure your <VirtualHost> directive specifies this port and the Apache Listen option is set to listen on this port. Default: 70

doc_root

The root of the Gopher server on your file system. Default: /noexists/

BUGS ^

Yes.

AUTHOR ^

 Timm Murray
 CPAN ID: TMURRAY
 E-Mail: tmurray@cpan.org
 Homepage: http://www.wumpus-cave.net

LICENSE ^

Apache::GopherHandler Copyright (C) 2004 Timm Murray

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

syntax highlighting: