This might be a simple question but I've never had to do it before, Googling for it is difficult, and none of the main docs seems to have the info.

I want to run myapp_server.pl script as a proxy as if it were from a dir.

This is easily accomplished with

    ProxyPass /from_dir http://localhost:8080/
    ProxyPassReverse /from_dir http://localhost:8080/

The problem then is $c->uri_for("/") returns http://localhost/ when http://localhost/from_dir is what is really needed.

This message seemed like the right answer
  http://lists.scsys.co.uk/pipermail/catalyst/2007-December/016241.html
but it doesn't work (Apache 2.2); uri_for() is still not adjusted to include the desired proxy path.

   RewriteEngine     On
   RewriteRule       ^/from_dir/(.*$)  http://localhost:8080/$1  [P]
   ProxyPassReverse  /from_dir/  http://localhost:8080/
   RewriteRule       ^proxy:.* - [F]

I played around with setting the (apparently?) undocumented "using_frontend_proxy" in the App config too but no dice.

What am I doing wrong / how can I get uri_for() to behave?

Thanks!
-Ashley

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to