I have a Ruby application running on a server.
When I run the rails server
command on my server, it shows the following message:
Rails 3.2.13 application starting in development on http://0.0.0.0:3000
If it was the local machine, I would have typed the following in my browser URL box:
localhost:3000
or simply:
http://0.0.0.0:3000
Since this is the server, how do I do this?
I tried the following, but did not work:
http://IP_ADDRESS_OF_SERVER:3000
Any suggestions?
Try running netstat -na | grep "LISTEN"
netstat -na | grep "LISTEN"
and this will show all active listening
ports. The web application must be running on any of these ports.
You just have to try all of them to find it.
Maybe the port is closed for outside connections. Login on your server per ssh and run
$ curl http://localhost:3000
If it returns the rendered index page, the server is running but the port is just disabled by the firewall
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.