[mod-lisp-devel] Using SBCL with mod_lisp

Alan Grover awgrover at mail.msen.com
Thu Feb 9 20:29:54 UTC 2006


CyBerHigh wrote:
> I am very new to the lisp scene.  I am a web developer, I am wanting to
> use mod_lisp because the lisp language looks very promissing.  I use to
> do most of my development in languages like python and ruby.  However
> recent reading I have turned to lisp and I really like it.  I am wanting
> to use mod_lisp to create a web site, I want to use SBCL.
> I installed lisp on my web server, it is apache 1.2, running Freebsd
> 5.4.  I tryed following the stuff on the mod_lisp web site, I got apache
> to start fine.  I tryed to veiw the site however I found out that I need
> to be running a lisp type server on port 3000 or something.  

Right. The model of mod_lisp is to have a process separate from
Apache-httpd for handling the desired requests. The mod_lisp module
forwards the request, and copies back the response. Your lisp process
reads the headers (and POST data), and sends a constructed response.
Note that mod_lisp is not particularly "lispy". It doesn't communicated
in s-expressions. But, it is a very simple protocol. I wrote a scheme
end of the bare-bones protocol
(http://sourceforge.net/project/showfiles.php?group_id=141512).

You can pick any port you want for the mod_lisp-to-lisp-server
communication.

> Also is it possible to make lisp the handler if it ends with a certain
> extention.  Not if it is in a certain directory?  Or is that the only
> way it can be set up?

Look through the various Apache directives (try the "quick reference"
section), searching for "CGI". Here's what I found:

ScriptAlias
Straight URL (path) -> CGI Script. So, by URL, rather than directory.

ScriptAliasMatch
Pattern match URL -> CGI. So, you could match by extension (or any part
of the URL-path).

Script
Activate a CGI based on the method (GET, POST, etc.).

Action
Seems to be able to map an extension or mime-type to a CGI (in
conjunction with AddHandler).

AddHandler
Specifically maps extensions to cgi handlers. Use Action to map the
"handler-name" to the cgi-script.

Read the "Handler" section, and the mod_cgi section.

-- 
Alan Grover
awgrover at mail.msen.com
+1.734.476.0969




More information about the mod-lisp-devel mailing list