views:

455

answers:

7

I've been playing a little bit with Arc/Anarki and Clojure lately. But what I really miss is something like mod_arc or mod_clojure for Apache. What I really miss is good Apache integration for a Lispy web language.

Both Arc and Clojure use their own built in webserver that you launch within your code. I want all the functionality, resiliency and scalability that Apache httpd gives me. Is anyone working on an Apache module for Arc or Clojure? Is there another Lisp like language that I can use with Apache? Is there an application server like Apache Tomcat that I can use with a Lisp like web language?

I come from a background in PHP and Perl. But also have lots of experience in C and /bin/sh. Since when I started writing web apps I was using cgi-bin and stdin to C binaries.

Thanks, Smutt

A: 

Why not use CGI?

alamar
+5  A: 

Maybe mod_lisp would work?

pjb3
+2  A: 

Clojure is a JVM language, so you should be able to set it up pretty much like any other Java app.

Chuck
+2  A: 

Hunchentoot, a web server in/for Common Lisp, can also be used behind Apache, through mod_lisp2.

Svante
+4  A: 

Using Clojure and Compojure, you can generate WAR-archives that can be deployed in pretty much any JEE-webserver (Jetty, Tomcat etc.).

pmf
+4  A: 

You can set up a Clojure/Java HTTP server (Jetty, etc.) running on some port, then use Apache's mod_proxy to forward certain requests from Apache to Clojure on that port. Something like this in your Apache configs:

    ProxyPass /static !
    ProxyPass /cgi-bin !
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/

So Apache will send every request to your Clojure app on port 8080 except requests to things in /static and /cgi-bin, which Apache will handle itself.

Brian Carper
A: 

Is that a joke about CGI? If not it should be downmodded.