1

我正在开发一个 facebook 应用程序,我正在使用该 facebooker 插件和 webrick 服务器。我已正确配置我的路由器以将端口转发到我的机器的 2 个端口(80 和 3000) 可以从网络访问 apache 服务器http://ip:80 amd webrick 服务器可以 http://ip:3000,我不明白为什么,请帮助我。

4

2 回答 2

2

What IP address do you have WEBrick set to listen on? My guess is it could be set to “127.0.0.1” which would cause the problem you’re describing. If so, set it to “0.0.0.0” and see if that works. If you’re starting the server with script/server, you can specify the IP to bind to with the -b flag:

script/server webrick -b 0.0.0.0 -p 3000
于 2010-03-23T06:49:30.160 回答
0

您必须从不在您网络中的另一个网络访问它。因为您的服务器在 IP 上运行,并且您的访问机器也连接到同一个 IP [因为端口转发]。所以它不能在同一个网络中工作。您必须从不同的 WAN IP 网络访问它。

于 2010-03-23T06:37:16.087 回答