How to make iron web server accessable at my ip


#1

Hi all.
Im working through the iron lib and i realy want to know if it is possible to make my iron server accessible at my ip. For example:
'Iron::new(some_routing).http(“192.234.0.90:80”).unwrap();'
Just panics! but on localhost:80 its ok.:
‘Iron::new(some_routing).http(“localhost:80”).unwrap();’ // OK!
What is the solution for my problem???
Thanks.


#2

Try with

Iron::new(some_routing).http(“0.0.0.0:80”).unwrap()


#3

i have already. It is the same as localhost, but by ip it is unreachable. (((((


#4

same post as this one?


#5

I ve decided to copy it in to get more chances for a reply.


#6

Please don’t do this, that is double-posting, and increase noise in the default “all categories” view that most people use.
There is only a single forum, and the “categories” are more like tags, not limits on visibility.


#7

Couple of things:

  • Binding to 0.0.0.0 is “any IP address” rather than binding to a particular one, try this out.
  • Binding to a port less than 1024 on linux will require superuser privileges - try binding to 0.0.0.0:8080 and pointing your browser to http://localhost:8080/
  • If these still fail - check out if localhost is actually your loopback device - $ dig localhost should show 127.0.0.1
  • To eliminate the browser as an issue when the service is running, try curl'ing the host / port and see if you get a response.

#8

Thanks very much. Im not sure but im the dummiest of the dummiest because
im on grey ip. I’l try my project out on the white one see if it works.