Running cgi-bin programs under AllegroServe
Robert Clark <[email protected]>
| Newsgroups | gmane.lisp.allegro |
|---|---|
| Message-ID | <[email protected]> |
I'm just getting started with Lisp and AllegroServe and could (desperately) use some help. I simply want to be able to run a cgi program using AllegroServe. Anytime that I try to run a program, I get an "HTTP 500 - Internal server error". I can serve up images and html pages fine. Here is my setup: directory contains (file contents are at end of email): a.lisp a.gif a.pl (755, #!/usr/bin/perl as first line, and runs fine stand-alone producing: Content-type: text/html\nHello, world!) Steps: run lisp (AllegroServe 6.1 - starts server on port 8000 and publishes files a.gif and a.pl enter http://hostname:8000/a.gif a.gif served up properly enter http://hostname:8000/a.pl get HTTP 500 error Any help would be greatly appreciated. Bob Clark a.lisp: (require :aserve) (defpackage :http-test (:use :common-lisp :excl :net.aserve :net.html.generator)) (in-package :http-test) (net.aserve::debug-on :info t) (start :port 8000) (publish-file :path "/a.gif" :file "a.gif" :content-type "image/gif") (publish :path "/a.pl" :function #'(lambda (req ent) (run-cgi-program req ent "/a.pl"))) a.pl: #!/usr/bin/perl print "Content-type: text/html\n\n"; print "Hello, world!\n";