[Dancer-users] deployment problems with apache + starman

Alex Knowles alexk at moonfruit.com
Mon Nov 7 19:05:49 CET 2011


On Mon, 2011-11-07 at 18:04 +0000, Alex Knowles wrote:
> There's a behind_proxy setting in config which is probably exactly for
> this situation:
> 
> http://search.cpan.org/~xsawyerx/Dancer-1.3080/lib/Dancer/Config.pm#behind_proxy_%28boolean%29
> 
> 
> there's also a proxypreservehost setting in apache proxy which helps.
> 
> http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost

sorry - i should have said - may help (although apache docs say don't
use it :) )

a

> 
> Alex
> 
> 
> On Mon, 2011-11-07 at 15:16 +0000, Assaf Gordon wrote:
> > Hello,
> > 
> > I'm having problems deploying a simple dancer app with Apache+Starman.
> > 
> > Even using the most basic setup doesn't seem to work properly - the "request.uri_for()" returns "http://localhost:3000" instead of the virtual server name.
> > I tried following the varied instructions in Dancer::Deployment, but that are just too many options, or perhaps I don't understand how the different parts connect.
> > 
> > What I did is:
> > 
> > ## 1. Create a new app
> > $ dancer -a foo
> > $ cd foo
> > 
> > ## 2. Start the server with Starman
> > $ plackup -s Starman -l 127.0.0.1:3000 ./bin/app.pl
> > 
> > ## In Apache, my configuration is;
> > <VirtualHost *:80>
> >         ServerName xxxx.cshl.edu
> >         ServerAlias xxxx
> > 
> >         ProxyPass / http://localhost:3000/
> >         ProxyPassReverse / http://localhost:3000/
> > </VirtualHost>
> > 
> > That's it, nothing more, nothing less.
> > I can see the main Dancer website stub ("Perl is Dancing" etc.), but every link inside the HTML page (e.g. the CSS file) points to "http://localhost:3000" instead of "http://xxxx.cshl.edu" - so none of the links is working.
> > 
> > 
> > Any suggestion will be highly appreciated,
> > Thanks,
> >  -assaf.
> > _______________________________________________
> > Dancer-users mailing list
> > Dancer-users at perldancer.org
> > http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
> 
> 
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users




More information about the Dancer-users mailing list