Problem

Solution

  1. Install Apache
    1. in Ubuntu via the GUI or apt-get:
      sudo apt-get install apache2
    2. in Free BSD via the ports tree
      su
      cd /usr/ports/www/apache2
      make install clean
    3. in Windows you might want to use XAMPP - it's the easiest way to install Apache, PHP, mySQL and Perl under Windows. Windows will not be covered here further though.
  2. Activate UserDir in Apache, add (or uncomment) the following line in your apache2.conf (under ubuntu, this file is in /etc/apache2/ ):
    UserDir public_html
    UserDir disabled root
  3. Right after that you need to add the following lines:
    <Directory /home/*/public_html>
    AllowOverride FileInfo AuthConfig
    Options SymLinksIfOwnerMatch IncludesNoExec ExecCGI
    </Directory>
    The Exec CGI? option is especially important here!
  4. Add the following line to make Apache execute your files ending with .lsp as CG Is? by adding:
    AddHandler cgi-script .lsp
  5. Now you need to create a public_html folder in your home directory
  6. Place a simple lisp command line script in it. For example the file test.lsp
    #!/usr/bin/clisp
    (print "Hello World. Here clisp goes online!")
  7. Make sure it is marked as executable by going to your public_html folder and type
    chmod 755 test.lsp
  8. Now restart your apache2 by typing:
    apache2ctl graceful
  9. Afterwards use your browser and type in the following address (Where you of course replace richard with your username ; )
    http://127.0.0.1/~richard/test.lsp
  10. Et voilą, you can show the world you lisp programming skills now ;)
  11. Attention: It is very important that - once you have set up such a system - you do not let anybody upload files either: to your home directory or with the extension .lsp. This would be an invitation for a breakin and/or a defacement of your server.

References + where to look further

Questions