[Dancer-users] strangeness with Dancer prefix and apache proxy

Puneet Kishor punk.kish at gmail.com
Sun Feb 5 22:00:51 CET 2012

I have the following in my apache2 conf file

    <VirtualHost *:80>
        ServerName my.computer.edu
        DocumentRoot "/path/to/Sites"
        <Proxy *>
            Options FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
        SetEnv force-proxy-request-1.0 1
        SetEnv proxy-nokeepalive 1
        ProxyPreserveHost On
        ProxyPass        /d/apps
        ProxyPassReverse /d/apps

When I go to http://my.computer.edu/d/apps/js/app.js the log shows
    request: GET //js/app.js from in ../Dancer/Handler.pm l. 52

When I go to the log shows 
    request: GET /js/app.js from in ../Dancer/Handler.pm l. 52

Why do I get to leading slashes in the first request above?

Additionally, when I go to http://my.computer.edu/d/apps I get a correct response (the double slashes notwithstanding). However, when I go to http://my.computer.edu/d/apps/foo then I get a 404. My perl code is like so

    package apps;
    use Dancer ':syntax';
    use Dancer::Plugin::Database;
    load_app 'eb', prefix => '/foo';

Puneet Kishor

More information about the Dancer-users mailing list