Copyright © 2002 Paul A. Hoadley
2003-03-31
Abstract
This document describes how to set up mod_lisp
2.2 under FreeBSD
4.5-R
. While specific versions are
mentioned for various software applications, the instructions
below can probably be applied to other versions, though the
latest version (currently 2.2) of
mod_lisp is recommended.
Table of Contents
![]() | Note |
---|---|
This article was written in 2002, and no longer provides
current information. It is preserved for historical purposes
only. In particular, several of the links to other documents and
the mod_lisp port are no longer
functional. There is, however, a
mod_lisp port in the ports tree at
|
mod_lisp is an extension module for the Apache HTTP Server that enables Apache to interface with web applications written in Lisp. This document will describe how to install:
Apache HTTP Server (briefly—this is a process that is well covered elsewhere)
GNU CLISP: an ANSI Common Lisp
mod_lisp
While GNU CLISP is the Lisp system used in this document, mod_lisp claims to interface equally well with other Lisp systems, such as Allegro Common Lisp and CMUCL.
Installation of Apache from the
ports is relatively unproblematic. The latest version of
Apache will probably work, though this
document was written when the current version was
Apache 1.3.22. As root
, execute the following:
#
cd /usr/ports/www/apache13/
#
make
#
make install
Some customisation of the configuration file
/usr/local/etc/apache/httpd.conf
will be
required. Getting Apache running is
beyond the scope of this article, and is well covered elsewhere.
At the end of installation and modification of
httpd.conf
, start
Apache as root
:
#
/usr/local/sbin/apachectl start
The parent Apache process will
run as root
, and all its
children will run as the user and group specified in the User and
Group directives in httpd.conf
. Test
Apache by pointing a browser at the
localhost:
#
lynx http://localhost/
A default Apache page should be displayed at this point.
Installation of GNU CLISP from
the ports is straightforward. As root
, execute the following:
#
cd /usr/ports/lang/clisp
#
make
#
make install
clisp should be available immediately, and can be tested by running:
#
clisp
Installing mod_lisp is only
marginally harder. The author of
mod_lisp has made a FreeBSD
port of the application,
though it is not currently in the FreeBSD
ports hierarchy. In other
words, an archive of the port skeleton can be downloaded and
extracted, but the skeleton is not currently in the
/usr/ports
directory tree. A FreeBSD
package is also available,
intended for installation with the pkg_add
utility, though this package expects a particular version of
Apache, and will not run without
modification if another version has been installed. The steps to
install mod_lisp are:
Download the mod_lisp FreeBSD Port from the Fractal Concept website:
#
cd /usr/local
#
fetch http://www.fractalconcept.com/fcweb/download/mod_lisp.tar.gz
Extract the archive:
#
gunzip mod_lisp.tar.gz
#
tar -xvf mod_lisp.tar
Make the port:
#
cd mod_lisp
#
make
#
make install
The appropriate LoadModule
directive
is added to httpd.conf
by the port using
apxs. The following directives need to be
added to httpd.conf
by hand:
LispServer 127.0.0.1 3000 "lispserver" <Location /lisp> SetHandler lisp-handler </Location>
The string "lispserver"
and the
Location /lisp
above can be
changed.
Restart Apache:
#
apachectl restart
There are three versions of the minimal Lisp application
in /usr/local/mod_lisp/work/mod_lisp-2.2
.
Assuming that GNU CLISP is the Lisp
system:
#
cd /usr/local/mod_lisp/work/mod_lisp-2.2
#
clisp -q
[1]>
(load 'modlisp-clisp)
;; Loading file /usr/local/mod_lisp/work/mod_lisp-2.2/modlisp-clisp.lisp ... ;; Loading of file /usr/local/mod_lisp/work/mod_lisp-2.2/modlisp-clisp.lisp is finished. T[2]>
(modlisp:modlisp-server)
Assuming the location /lisp
was
specified in httpd.conf
, a minimal banner
(inadvertently advertising Linux
!) can be found at:
#
lynx http://localhost/lisp/
The author of this document is Paul Hoadley. This
document only describes what I did to get
mod_lisp functioning on my FreeBSD
machine. Your mileage may
vary. If you notice any errors in this document, or your
experience with mod_lisp was vastly
different, please let me
know.