Hello World with SBCL CGI
This is the most simple CGI with SBCL. CGI source code is like below.
#!/usr/bin/sbcl --script (format t "Content-Type:text/plain~%~%") (format t "Hello, SBCL CGI!!!~%")
Generating /usr/lib/cgi-bin/default.l with above contents. And add execute permission.
Then, configure apache2 CGI like below and restart apache2.
ScriptAlias /cgi-bin /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory>
After all above done, try curl http://localhost/cgi-bin/default.l. Here is my result.
# curl http://localhost/cgi-bin/default.l Hello, SBCL CGI!!! #