[Dancer-users] Global app-wide "prefix" settings

Assaf Gordon gordon at cshl.edu
Wed Sep 28 23:03:25 CEST 2011


First, Brian - thank you!
For a minute there I thought I was going mad, imagining non-existent problems that I can't seem to explain :)

a minor breakthrough!

This might have caused my confusion (especially after reading Alberto's email, that made it sound like it's already built-in):

If I deploy using :
===
    <Location /app1>
        SetHandler perl-script
        PerlHandler Plack::Handler::Apache2
        PerlSetVar psgi_app /home/gordon/projects/dancer/bin/app.pl
    </Location>
===
Then indeed, "request.uri_base" will be "http://server.cshl.edu/app1" - and everything "just works" (including all the static files, they go under "/app1/images/*").

But if I deploy using just "./bin/app.pl" or using Plackup+starman, then "request.uri_base" is always root, regardless of the apache/reverse-proxy configuration.

I haven't tested other deployment methods yet.

I'll investigate some more... perhaps there's a way to make it work with Plackup+Starman .


Thanks again everyone,
 -gordon



More information about the Dancer-users mailing list