[plt-scheme] Proxying the PLT web server?

From: Noel Welsh (noelwelsh at gmail.com)
Date: Thu Oct 23 02:59:46 EDT 2008

On Wed, Oct 22, 2008 at 11:56 PM, Marek Kubica <marek at xivilization.net> wrote:
> Now I'd like to put the PLT web server behind the Apache
> server via mod_proxy. Has someone ever tried doing this? Is this going
> to work? My primary concern are the URLs, I need to generate URLs that
> point to my Apache server and not to the PLT server.

This is how we normally run things at Untyped, except we use
mod_rewrite.  Here is an example section from an Apache configuration
file:

  RewriteEngine On
  RewriteLog "/var/log/apache2/rewrite.log"
  RewriteLogLevel 1

These rules catch stuff we want Apache to serve

  RewriteRule ^/error(/?.*)$   /error$1                     [L]
  RewriteRule ^/help(/?.*)$    /help$1                      [L]
  RewriteRule ^/images(/?.*)$  /images$1                    [L]
  RewriteRule ^/style(/?.*)$   /style$1                     [L]
...

Finally, send everything else to the PLT web server, which runs on port 8765

  RewriteRule ^(/?.*)$         http://localhost:8765$1      [P]

YC wrote:
> (i.e. removing prefixes such as /servlets/)

If you have this issue you should look at, for example, the
dispatch.plt package on PLaneT.

N.


Posted on the users mailing list.