[dancer-users] Dancer2/starman/NGINX deployment question

Richard Reina gatorreina at gmail.com
Thu Feb 22 02:52:17 GMT 2018


Followed Gabor's tutorial
https://perlmaven.com/getting-started-with-perl-dancer-on-digital-ocean

and got my app running on my digitalocean droplet. However, am only able to
view it with http://my.ip.ad.ress:5000 and not if I leave off the :5000

cat /home/starman/nginx-demo.conf
server {
  location / {
          proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Host $http_host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_pass http://localhost:5000;
   }


cat /home/starman/starman.pl

#!/usr/bin/perl

use warnings;
use strict;
use Daemon::Control;

use Cwd qw(abs_path);

Daemon::Control->new(
    {
    name      => "Starman",
    lsb_start => '$syslog $remote_fs',
    lsb_stop  => '$syslog',
    lsb_sdesc => 'Starman Short',
    lsb_desc  => 'Starman controls the web sites.',
    path      => abs_path($0),

    #program      => 'plackup -E deployment -s Starman',
    program      => '/home/starman/perl5/bin/starman',
    program_args => [ '--workers', '3',
'/home/starman/rushlogistics/bin/app.psgi' ],

    #plackup -E deployment -s Starman --workers=10 -p 5001 -a bin/app.psgipl
    user  => 'starman',
    group => 'starman',

    pid_file    => '/tmp/starman.pid',
    stderr_file => '/tmp/starman.err',
    stdout_file => '/tmp/starman.out',

    fork => 2,

    }
    )->run;

tail /tmp/starman.err
2018/02/22-02:08:12 Server closing!
2018/02/22-02:08:12 Starman::Server (type Net::Server::PreFork) starting!
pid(13960)
Resolved [*]:5000 to [0.0.0.0]:5000, IPv4
Binding to TCP port 5000 on host 0.0.0.0 with IPv4
Setting gid to "1002 1002 0"


Any idea what I might have missed?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20180221/94241f31/attachment.html>


More information about the dancer-users mailing list