Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
go ahead... be a heretic
 
PerlMonks  

start Mojolicious::Commands application daemon on localhost

by Anonymous Monk
on Feb 13, 2012 at 03:11 UTC ( #953386=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

When I run somemojoapp daemon it shows
[Sun Feb 12 19:01:33 2012] [info] Server listening (http://*:3000) Server available at http://127.0.0.1:3000.

How do i specify localhost:80 as commandline option? or through some config file?

netstat -bn shows

TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 1 +876 [perl.exe]
which I understand is local network only (accessible through private network ip), but I only want localhost

How to get localhost only?

Thanks

Comment on start Mojolicious::Commands application daemon on localhost
Select or Download Code
Re: start Mojolicious::Commands application daemon on localhost
by oko1 (Deacon) on Feb 13, 2012 at 04:20 UTC

    I'm not familiar with Mojolicious, but binding to a "well-known", or privileged (<=1023) port requires root access. You can do it, but it brings up a raft of other (read 'security') considerations.

    -- 
    I hate storms, but calms undermine my spirits.
     -- Bernard Moitessier, "The Long Way"
      FWIW I am aware of this linux custom, it has nothing to do with my question
        Think you left out a but there
Re: start Mojolicious::Commands application daemon on localhost
by repellent (Priest) on Feb 13, 2012 at 07:04 UTC

      Thank you.

      Apparently  appname -help daemon will print that stuff out

      and appname -l http://localhost:80/ will work start listening on localhost only

        I am new to Mojolicious (and also Plack), and I like what I see. I am currently running my Apps on a Virtual Dedicated host with Apache 2.2 and mod_fastcgi. But my web framework is "homegrown", and I really need the middleware that these offer.

        My problem is using the server that is provided (Mojo's or plackup). They call them daemons, but they do not run in detached bg as Apache (httpd) does, but instead tie up a terminal.

        What am I missing? I can't believe such beautiful software would be run that way in production.

        Thanks, Ray

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://953386]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2014-04-17 10:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (444 votes), past polls