[Dancer-users] deployment problems with apache + starman
Puneet Kishor
punk.kish at gmail.com
Mon Nov 7 19:20:04 CET 2011
On Nov 7, 2011, at 9:16 AM, 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,
Just suggestions here, because with "almost" exactly the same as above, my apps work just fine. Here is the "almost" part. I start Starman with different settings. I recall that I did try it with -l option, and it funked out for me, although I don't recall the specifics of the errors I got. I remember being quite mystified until I went back to my original way of calling Starman, and that works. Here is how I launch it
my @cmd = (
"plackup",
"-s Starman",
"-p $port",
"-w 10",
"-E $env",
"--access-log $dir_logs/$access",
"--error-log $dir_logs/$error",
"-D",
"--pid $dir_pids/$pid",
"-a $dir_appl/$app/bin/app.pl"
);
system( join(" ", @cmd) );
The main different from your way is that I use `-p $port` instead of `-l $host:$port`
Other than that, my settings are the same as yours.
--
Puneet Kishor
More information about the Dancer-users
mailing list