有什么办法可以访问本地网络中的GAE dev应用服务器吗? [英] Is there any way to access GAE dev app server in the local network?

查看:133
本文介绍了有什么办法可以访问本地网络中的GAE dev应用服务器吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我通过 http:// localhost:8080 从同一台Win 7 PC访问我的网站,其中服务器是如果我尝试从另一台电脑访问它(使用我内部电脑的ip 1.98:8080rel =noreferrer> http://192.168.1.98:8080 ),那么它不起作用。而且,即使在同一台机器上,也不能通过此ip访问。我在做什么错了?



(我试图在我的Win 7 PC上禁用防火墙 - 它没有帮助)


<首先检查你的服务器是在环回还是在所有的接口上进行侦听 - 在 netstat -an 中的命令行类型中进行侦听找到一个端口8080和状态LISTENING的行,如下所示:

 TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 

如果IP为0.0.0.0,则意味着它监听所有IP地址,问题在于其他地方阻止它。



如果IP是127.0.0.1,那么你需要绑定到0.0.0.0地址。现在有趣的生物 - 根据文档,您应该添加 - address = 0.0.0.0 - host = 0.0.0.0 参数在运行配置中(取决于GAE版本 - 谢谢@momijigari)。但在我的情况下,我也有GWT和参数去GWT,它不接受这个说法。但另一方面在所有接口上侦听,我个人试图将其更改为本地主机。尽管GWT有 -bindAddress 参数,但它只设置代码服务器的地址(默认为9997端口),而不是HTTP。


If I access my web site via http://localhost:8080 from the same Win 7 PC, where server is running, then it works well.

If I try to access that from another PC (with usage of my internal PC's ip http://192.168.1.98:8080), then it doesn't work. Moreover, it is not accessible with this ip even on the same machine. What am I doing wrong?

(I've tried to disable firewall on my Win 7 PC - it didn't help)

解决方案

First check whether your server listens on loopback or on all interfaces - in command line type in netstat -an find a line with port 8080 and state LISTENING, something like this:

  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING

If IP is 0.0.0.0 it means it listens on all IP addresses and the problem is with something else blocking it.

If IP is 127.0.0.1 then you need to bind to 0.0.0.0 address. And now the fun beings - according to documentation, you should add --address=0.0.0.0 or --host=0.0.0.0 to arguments in run configuration (depends on GAE version - thank you @momijigari). But in my case I have also GWT and parameters go to GWT and it does not accept this argument. But on the other hand listens on all interfaces, which I personally was trying to change to localhost. The GWT has -bindAddress parameter though, but it sets only address for code server (one with 9997 port by default), not HTTP.

这篇关于有什么办法可以访问本地网络中的GAE dev应用服务器吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆