[racket] apache configuration for racket

From: Noel Welsh (noelwelsh at gmail.com)
Date: Thu Oct 28 08:29:42 EDT 2010

On Sun, Oct 24, 2010 at 3:33 PM, scouic <scouic at gmail.com> wrote:
> Hi,
> i have a local apache server (win$) and i would like to know how can i
> configure it for that, when i'm connecting at 127.0.0.1, it launches a
> Racket executable file, for example index.rkt (or index.exe) ?

This is called CGI. It is not specific to Racket -- if you search for
Apache CGI setup you should find plenty of information about this.

> PS : i've seen the (generate-html-output ...) from cgi, must i use this
> function in my Racket file ?

You should use the CGI library if you are writing CGI programs.

An alternative to CGI is to forward requests from Apache to the Racket
web server. To do this in Apache you can setup a config like this:

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/scheme/.*
RewriteRule ^/scheme/(.*)$ http://localhost:8080/servlets/$1 [P]

[Taken from here:
http://www.mombu.com/programming/scheme/t-apache-mod-proxy-plt-web-server-540346.html]

HTH,
N.


Posted on the users mailing list.