不好意思問候noob問題。無法使用我的Ubuntu服務器的公網IP在瀏覽器中訪問我的Rails應用程序
我有一個Ubuntu 16.04.1 LTS(GNU/Linux 4.4.0-63-generic x86_64)服務器,我的公有IP是類似於183.xx.xxx.xx(curl -4 icanhazip.com).I
rails s -b0.0.0.0 -p3002
和彪馬服務器已成功啓動
=> Booting Puma
=> Rails 5.0.3 application starting in development on http://localhost:3002
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.9.1 (ruby 2.4.0-p0), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3002
Use Ctrl-C to stop
我試圖訪問我的應用程序在瀏覽器中使用:使用命令運行我的Rails應用程序
http://183.xx.xxx.xx:3002
我越來越
This site can’t be reached
172.xx.xxx.xx took too long to respond.
ERR_CONNECTION_TIMED_OUT
netstat的-plnt
tcp 0 0 0.0.0.0:45109 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:3002 0.0.0.0:* LISTEN 25689/0.0.0.0:3002)
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN -
的處理與PID 25689
任何幫助運行事先高度Appreciate.Thanks!
您一定要使用正確的IP驗證'ifconfig' –
你爲什麼想要通過端口訪問您的導軌應用程序?只需使用Web服務器進行配置即可。比如:apache2或Nginx – hgsongra
@ Farhan,謝謝你的回覆。我確定使用正確的公有IP。 – suresh