成功启动本地,可以进行访问(无法从外部访问)

启动成功,本地启动浏览器本地磁盘d无法访问,可以访问(不能从外面访问,原因是IP没有绑定

只需使用 Ctrl+C 即可停止此应用程序

如果要从外部访问本地磁盘d无法访问,可以如下配置

-b 可以绑定服务IP

[root@h202 blog]# rails server -b 0.0.0.0=> Booting WEBrick=> Rails 4.2.6 application starting in development on http://0.0.0.0:3000=> Run `rails server -h` for more startup options=> Ctrl-C to shutdown server[2016-04-22 13:47:39] INFO  WEBrick 1.3.1[2016-04-22 13:47:39] INFO  ruby 2.3.0 (2015-12-25) [x86_64-linux][2016-04-22 13:47:39] INFO  WEBrick::HTTPServer#start: pid=11622 port=3000.........

打开防火墙

[root@h202 ~]# netstat -ant | grep 300tcp        0      0 127.0.0.1:3000              0.0.0.0:*                   LISTEN      tcp        0      0 ::1:3000                    :::*                        LISTEN      [root@h202 ~]# [root@h202 ~]# vim /etc/sysconfig/iptables[root@h202 ~]# /etc/init.d/iptables reload iptables: Trying to reload firewall rules:                 [  OK  ][root@h202 ~]# iptables -L -nv | grep 3000    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:3000 [root@h202 ~]# 

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

悟空资源网 网站程序 成功启动本地,可以进行访问(无法从外部访问) https://www.wkzy.net/game/8325.html

常见问题

相关文章

官方客服团队

为您解决烦忧 - 24小时在线 专业服务