[Dancer-users] Dancer on shared hosting

Patrick Donelan pat at patspam.com
Tue Jun 1 06:15:59 CEST 2010

Hi Dancer people,

I was playing with Dancer today, trying to work out the right recipe to get
it running smoothly on a shared hosting account (documented

I started with trying to get Dancer running in CGI mode, but for some reason
I could get it to accept requests to '/', e.g. http://domain/dispatch.cgi/
Whenever I request that, it returns the contents of dispatch.cgi, even with
the default route changed to r('.*'). Whereas requests to /dispatch.cgi/blah
work fine.

Sounds like an Apache problem right? The bizarre thing is that other simple
plack CGI scripts work fine, and if I actually put a
Data::Dumper::Dumper($env) into app.psgi, it actually dumps out the env hash
(before returning the contents of dispatch.cgi), which seems to indicate
it's actually running the script, but then bailing out or something.

In case it helps, the dumped contents of $env are:

'psgi.multiprocess' => 1,
'SCRIPT_NAME' => '/dispatch.cgi',
'PATH_INFO' => '/',
'PERL_MM_OPT' => 'INSTALL_BASE=/home1/muscleca/perl5',
'psgi.multithread' => 0,
'SERVER_SOFTWARE' => 'Apache/2.2.15 (CentOS) mod_ssl/2.2.15 0.9.8l DAV/2
mod_auth_passthrough/2.1 FrontPage/',
'PLACK_ENV' => 'development',
'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; U; Linux i686; en-US)
AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.55 Safari/533.4',
'REMOTE_PORT' => '50243',
'HTTP_PRAGMA' => 'no-cache',
'SERVER_SIGNATURE' => '<address>Apache/2.2.15 (CentOS) mod_ssl/2.2.15 0.9.8l
DAV/2 mod_auth_passthrough/2.1 FrontPage/ Server at
hostmonster.perlsharedhosting.com Port 80</address>
'HTTP_CACHE_CONTROL' => 'no-cache',
'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.8',
'psgi.streaming' => 1,
'PATH' => '/home1/muscleca/perl5/bin:/usr/local/bin:/usr/bin:/bin',
'psgi.version' => [
'DOCUMENT_ROOT' => '/home1/muscleca/public_html/perlsharedhosting',
'psgi.run_once' => 1,
'MODULEBUILDRC' => '/home1/muscleca/perl5/.modulebuildrc',
'UNIQUE_ID' => 'TASHmkrc13MAAGkor0AAAAnZ',
'SERVER_NAME' => 'hostmonster.perlsharedhosting.com',
'HTTP_ACCEPT_ENCODING' => 'gzip,deflate,sdch',
'SERVER_ADMIN' => 'webmaster at perlsharedhosting.musclecarwebdesign.com',
'HTTP_CONNECTION' => 'keep-alive',
'HTTP_ACCEPT_CHARSET' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
'SERVER_PORT' => '80',
'REMOTE_ADDR' => '',
'psgi.errors' => *::STDERR,
'REQUEST_URI' => '/',
'psgi.nonblocking' => 1,
'SERVER_ADDR' => '',
'psgi.url_scheme' => 'http',
'HTTP_HOST' => 'hostmonster.perlsharedhosting.com',
'psgi.input' => *::STDIN


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20100601/2f3d54a8/attachment.htm>

More information about the Dancer-users mailing list