[Dancer-users] Dancer deployment bugs with Plack::Handler::Apache2
gordon at cshl.edu
Wed Oct 19 18:33:14 CEST 2011
I've deployed two Dancer applications on one apache server using "Plack::Handler::Apache2" (one is the "SimpleCrud" test page mentioned yesterday), and I'm experiencing very strange bugs:
It seems the two applications are conflicting, when routes or templates from one application are used by the other.
That is, the deployment in Apache is as follows:
PerlSetVar psgi_app /home/gordon/projects/simple_crud_sortable/bin/app.pl
Deny from all
Allow from cshl.edu
PerlSetVar psgi_app /var/www/data/xxxxx/dancer/bin/app.pl
And when I browse to the virtual server ( http://xxxxx.cshl.edu ), I most of the times get the correct page, but sometimes I get this error:
'/home/gordon/projects/simple_crud_sortable/views/about/index.tt' is not a regular file at /usr/lib/perl5/site_perl/5.8.8/Dancer.pm line 161
That is: visiting the new application somehow tries to fetch a template from the "simple_crud" application (probably because a wrong route from "simple_crud" was used).
I know it sound strange (or unbelievable?), but it has happened several times (not always, though, so it's hard to pin-point).
Additionally, several static files (css/images) sometimes returns HTTP-404 - which I guess is also related to routes mix-up.
viewing the "/var/log/httpd/error_log" file, I can see dancer debug messages trying to match rountes from my other application even if I visit "http://cancan.cshl.edu/labmembers/gordon/simple_crud/genes".
Has any one encountered such behavior ?
Or is no one deploying production application using "Plack::Handler::Apache2" ?
More information about the Dancer-users