[kpax-devel] kpax and mod_lisp

Sven Van Caekenberghe scaekenberghe at common-lisp.net
Fri Apr 20 08:35:59 UTC 2007


Nico,

I just configured my machine (MacBook Pro, Mac OS X 10.4.9) 'from  
scratch' to run KPAX under Apache+mod_lisp and it worked as described  
in my older posting to this list (Feb 4 2006). Here are some  
transcripts:

$ httpd -v
Server version: Apache/1.3.33 (Darwin)
Server built:   Aug 19 2006 07:55:18

[sven at voyager:~/apps/mod_lisp]$ head mod_lisp.c
#define MOD_LISP_VERSION "2.43"
#define HEADER_STR_LEN 500

/*
   Version 2.43
   fixed possible memory leak when the connection to the Lisp process  
fails (Alain Picard)
   Set r->mtime directly (Edi Weitz)

   Version 2.42
   Added "Lisp-Content-Length" header

[sven at voyager:~/apps/mod_lisp]$ sudo apxs -i -c mod_lisp.c
Password:
gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os - 
pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE -I/usr/include/ 
httpd  -c mod_lisp.c
In file included from /usr/include/httpd/ap_config.h:1129,
                  from /usr/include/httpd/httpd.h:29,
                  from mod_lisp.c:182:
/usr/include/httpd/hsregex.h:22:1: warning: "ap_private_extern"  
redefined
In file included from /usr/include/httpd/httpd.h:29,
                  from mod_lisp.c:182:
/usr/include/httpd/ap_config.h:1025:1: warning: this is the location  
of the previous definition
cc -bundle -undefined suppress -flat_namespace -Wl,-bind_at_load -o  
mod_lisp.so mod_lisp.o
cp mod_lisp.so /usr/libexec/httpd/mod_lisp.so
chmod 755 /usr/libexec/httpd/mod_lisp.so

[sven at voyager:/etc/httpd]$ grep -A 3 SVC httpd.conf
# Addition: SVC
LoadModule lisp_module         libexec/httpd/mod_lisp.so

#  Reconstruction of the complete module list from all available modules
--
# Addition: SVC
AddModule mod_lisp.c

#
--
# Addition: SVC
Include /private/etc/httpd/kpax.conf

[sven at voyager:/etc/httpd]$ cat kpax.conf
<IfModule mod_lisp.c>
LispServer 127.0.0.1 2001 "kpax"
<Location /kpax/dynamic/>
         SetHandler lisp-handler
</Location>
Alias /kpax/static/gpsbuddy/ "/Users/sven/svn/gpsbuddy-web/trunk/lisp/ 
rsrc/static-html/"
Alias /kpax/static/ "/Users/sven/darcs/kpax/example/static/"
</IfModule>

[sven at voyager:/etc/httpd]$ sudo apachectl configtest
Processing config directory: /private/etc/httpd/users/*.conf
Processing config file: /private/etc/httpd/users/sven.conf
Syntax OK

[sven at voyager:/etc/httpd]$ sudo apachectl restart
/usr/sbin/apachectl restart: httpd restarted

And now in LispWorks:

KPAX-USER 90 > (start-kpax :server-class 'mod-lisp-server)
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :TODO-LIST 21512563>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :TODO-LIST 21512563>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :SESSION1 21512FEB>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :SESSION1 21512FEB>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :LIST-WEB-APPS 218B2D9B>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :LIST-WEB-APPS 218B2D9B>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :UPLOAD2 2149533F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :UPLOAD2 2149533F>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :WIKI 218B98EB>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :WIKI 218B98EB>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :FACTORIAL1 214F3747>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :FACTORIAL1 214F3747>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :SECURE-LOGIN 218B4E6F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :SECURE-LOGIN 218B4E6F>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :UPLOAD3 2185808B>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :UPLOAD3 2185808B>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :REDDIT 218D789F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :REDDIT 218D789F>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :SECURE1 2149799B>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :SECURE1 2149799B>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :WELCOME 218E1887>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :WELCOME 218E1887>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :MENU1 218B1AEF>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :MENU1 218B1AEF>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :NO-SESSION1 214B8087>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :NO-SESSION1 214B8087>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :BENCHMARK1 218794EF>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :BENCHMARK1 218794EF>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :KIWI 218B971F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :KIWI 218B971F>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :BROWSER1 218B870F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :BROWSER1 218B870F>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :TABS1 218B04BB>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :TABS1 218B04BB>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :FORMS1 21431C77>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :FORMS1 21431C77>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :LSP 218BB157>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :LSP 218BB157>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :FORMS2 2187A473>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :FORMS2 2187A473>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :UPLOAD1 21496E7F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :UPLOAD1 21496E7F>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :HELLOWORLD1 214F6AF3>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :HELLOWORLD1 214F6AF3>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :CALCULATOR 218AEB93>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :CALCULATOR 218AEB93>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :PI 218CA02B>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :PI 218CA02B>
;; KPAX 20070420T075517 INFO Stopped #<WEB-APP :SNOOP1 217C650F>
;; KPAX 20070420T075517 INFO Started #<WEB-APP :SNOOP1 217C650F>
;; KPAX 20070420T075517 INFO Server running
#<MOD-LISP-SERVER :RUNNING 21F866D3>
;; KPAX 20070420T075535 INFO handling http://localhost/kpax/dynamic/ 
welcome
;; KPAX 20070420T075535 INFO created new session QKSC2M51NB9J  
[3498165205728447943]
;; KPAX 20070420T075535 INFO replied 4606 bytes with status OK
;; KPAX 20070420T075539 INFO handling http://localhost/kpax/dynamic/ 
helloworld1/
;; KPAX 20070420T075539 INFO created new session QKSC2P5H0W10  
[3498165212284622628]
;; KPAX 20070420T075539 INFO replied 550 bytes with status OK
;; KPAX 20070420T075603 INFO handling http://localhost/kpax/dynamic/ 
calculator/
;; KPAX 20070420T075603 INFO created new session QKSC2QOPC2OU  
[3498165215624221086]
;; KPAX 20070420T075603 INFO replied 319 bytes with status MOVED
;; KPAX 20070420T075603 INFO handling http://localhost/kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.0/
;; KPAX 20070420T075603 INFO replied 2043 bytes with status OK
;; KPAX 20070420T075604 INFO handling http://localhost/kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.1/calculator-hit-key?key=2
;; KPAX 20070420T075604 INFO replied 2043 bytes with status OK
;; KPAX 20070420T075605 INFO handling http://localhost/kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.2/calculator-hit-key?key=%2B
;; KPAX 20070420T075605 INFO replied 2043 bytes with status OK
;; KPAX 20070420T075606 INFO handling http://localhost/kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.3/calculator-hit-key?key=9
;; KPAX 20070420T075606 INFO replied 2043 bytes with status OK
;; KPAX 20070420T075607 INFO handling http://localhost/kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.4/calculator-hit-key?key=%3D
;; KPAX 20070420T075607 INFO replied 2044 bytes with status OK
;; KPAX 20070420T075612 INFO handling http://localhost/kpax/dynamic/ 
welcome
;; KPAX 20070420T075612 INFO replied 4606 bytes with status OK

The relevant access_log tail:

127.0.0.1 - - [20/Apr/2007:09:55:36 +0200] "GET /kpax/dynamic/welcome  
HTTP/1.1" 200 4606
127.0.0.1 - - [20/Apr/2007:09:55:36 +0200] "GET /kpax/static/nx.css  
HTTP/1.1" 200 9421
127.0.0.1 - - [20/Apr/2007:09:55:36 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:55:39 +0200] "GET /kpax/dynamic/ 
helloworld1/ HTTP/1.1" 200 550
127.0.0.1 - - [20/Apr/2007:09:55:39 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:55:39 +0200] "GET /kpax/static/ 
helloworld1/kpax-movie-poster.jpg HTTP/1.1" 200 25982
127.0.0.1 - - [20/Apr/2007:09:56:03 +0200] "GET /kpax/dynamic/ 
calculator/ HTTP/1.1" 301 319
127.0.0.1 - - [20/Apr/2007:09:56:03 +0200] "GET /kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.0/ HTTP/1.1" 200 2043
127.0.0.1 - - [20/Apr/2007:09:56:03 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:56:03 +0200] "GET /kpax/static/ 
calculator/calculator.css HTTP/1.1" 200 858
127.0.0.1 - - [20/Apr/2007:09:56:04 +0200] "GET /kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.1/calculator-hit-key?key=2 HTTP/1.1"  
200 2043
127.0.0.1 - - [20/Apr/2007:09:56:04 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:56:05 +0200] "GET /kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.2/calculator-hit-key?key=%2B HTTP/1.1"  
200 2043
127.0.0.1 - - [20/Apr/2007:09:56:05 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:56:06 +0200] "GET /kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.3/calculator-hit-key?key=9 HTTP/1.1"  
200 2043
127.0.0.1 - - [20/Apr/2007:09:56:06 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:56:07 +0200] "GET /kpax/dynamic/ 
calculator/KPAX1.QKSC2QOPC2OU.4/calculator-hit-key?key=%3D HTTP/1.1"  
200 2044
127.0.0.1 - - [20/Apr/2007:09:56:07 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297
127.0.0.1 - - [20/Apr/2007:09:56:12 +0200] "GET /kpax/dynamic/welcome  
HTTP/1.1" 200 4606
127.0.0.1 - - [20/Apr/2007:09:56:12 +0200] "GET /favicon.ico HTTP/ 
1.1" 404 297

Nothing relevant in the error_log

HTH,

Sven




More information about the kpax-devel mailing list