Question

Up to now i have tested hunchentoot-cgi(CL), mighttpd2(Haskell), ocsigen(OCaml), yaws(erlang) to host an old python CGI application. Except hunchentoot-cgi, all work great. I like Lisp-style programming, so i really want to host the application in a Lisp style web server.

In erlang, i just need to config it as below:

>cat ~/yaws.conf
...
<server 192.168.1.2>
    port = 8000
    listen = 0.0.0.0
    docroot = /media/G/www/qachina/
    access_log = false
    appmods = <cgi-bin, yaws_appmod_cgi>
</server>
...

then the python CGI application can work.

How about Noir/Ring ?

Was it helpful?

Solution

Ring (and, consequently, Noir) is not a web server in the sense you seem to think. It is a framework for creating web applications. It does not provide access to external applications; rather it allows you to write your own dynamic web applications in Clojure. Then these applications can be deployed to standard Java servlet container or run manually using embedded Jetty web server.

It is of course possible to create such web application which would take an output of an external CGI program, process it and feed the results to the client, but you have to write all CGI processing by yourself (e.g. parse HTTP headers and construct standard Ring response map). As far as I know, there are no CGI wrappers for Ring stack.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top