1

In order to start sidekiq web UI I currently do:

rackup sidekiq_web.ru -p 9293

However once puma starts it listens only to localhost.

* Listening on tcp://localhost:9293

How can I run this on http://0.0.0.0:9293?

Thanks

stratis
  • 7,750
  • 13
  • 53
  • 94
  • Yes I do. I just want to run this on the server so I can access it from my local machine. – stratis Oct 09 '18 at 09:30
  • it says it is "Listening on tcp://localhost:9293". So you can run it from http://localhost:9293 , right? – Michael Oct 09 '18 at 09:31
  • Yes I can. But I can't access it from the outside world a.k.a my local machine. – stratis Oct 09 '18 at 09:31
  • I mean, no browser will ever show you a web page if you enter `http://0.0.0.0:9293` into the address field – Michael Oct 09 '18 at 09:32
  • True but if puma listens on 0.0.0.0 (that is all interfaces), once I type my server's IP `http://MY_SERVER_IP:9293` it will. – stratis Oct 09 '18 at 09:33
  • 1
    a quick google search said that you can add `-o 0.0.0.0` to the command line (after the -p). Does it work? – Michael Oct 09 '18 at 09:34
  • 1
    Yes it did! Thanks! I was probably searching for the wrong thing. For the record, what did you search for? (plz post your last comment as an answer so that I can accept it) – stratis Oct 09 '18 at 09:38
  • 1
    I searched "rackup listen on all interfaces". For me, the second result was [this site](http://www.jamesrobertson.eu/clf/2014/dec/25/running-rack-on-host-0-0-0-0.html). – Michael Oct 09 '18 at 09:40
  • Nice! Thanks. Thought it was a sidekiq issue. – stratis Oct 09 '18 at 09:42

1 Answers1

2

You can use the -o option.

rackup sidekiq_web.ru -p 9293 -o 0.0.0.0

This will make rackup listen on all available network interfaces.

Michael
  • 6,451
  • 5
  • 31
  • 53