[Dancer-users] deploying multiple dancer websites on localhost with mod_proxy
Alexis Sukrieh
sukria at sukria.net
Tue Mar 9 09:03:45 CET 2010
Le lundi 08 mars 2010 à 18:26 -0600, P Kishor a écrit :
> > You should find the auto_page feature ideal for that... with that enabled,
> > creating $appdir/views/mypage.tt means the a request for /mypage will
> > automatically be handled using that view, without you needing to declare any
> > route to match it.
>
> ok, I found and read up on the auto_page setting. That doesn't seem to
> be what I want. I want stuff in $appdir/public to be served directly,
> and that is not happening right now.
Please, don't mixup things. You have two issues:
1. You want a smart route handler that can match any path requested and
serve the appropriate content (retreived from a database), depending on
the path. You can't do that with a token-pattern match.
If you want to write a "catchall" route handler, you have to use a
regexp-pattern like the following:
get r('/(.*)') => sub {
my $path = request->path;
# ... do what you want with $path
};
2. Your static files are not served
This is not a Dancer issue, this is a configuration issue. First of all,
monitor your Apache access/error logs when you hit your app, and look
for the reason of the 404.
Maybe Apache doesn't pass the baton to Dancer when it's a static file
that is requested, and maybe your DocumentRoot points to a bad
location...
It can come from many, many reasons, and it's quite impossible for us,
on the mailing list, to debug your apache installation.
But please, when you write a mail with a request for help on that
mailing list, try to focus on one problem at a time, mixing up different
issues in the same mail is hard to follow... and to help ;)
Happy dancing.
--
Alexis Sukrieh
More information about the Dancer-users
mailing list