linux - 无法在另一台机器上使用 IP 打开 Web 应用程序?

标签 linux web-applications playframework-2.0 firewall

我在 Linux 机器上运行基于 Play 的网络应用程序: enter image description here

在这台机器上我可以看到它在工作: enter image description here

我需要在另一台机器上打开 webapp。所以我得到了ip: enter image description here

webapp使用原机上的ip打开: enter image description here

但我无法在其他机器上打开它: enter image description here

可能是什么原因?

最佳答案

最可能的原因是端口错误。标准的 HTTP 端口是 80。对于此协议(protocol) (HTTP),只有此端口在 Internet 中中继。您使用的端口 8010 在您的本地计算机甚至本地网络(取决于交换机/路由器设置)上工作正常,但如果您尝试从 Internet 连接到此服务器,它将失败。启动 Play 应用程序时,只需将 -Dhttp.port 参数中的端口从 8010 更改为 80。

关于linux - 无法在另一台机器上使用 IP 打开 Web 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33851454/

相关文章:

java - play 2.0中没有play.test.FunctionalTest怎么写功能测试?

python - 为什么 python 脚本抛出 AttributeError : 'module' object not found, 但在可执行文件时有效?

用于 Linux IP 枚举的 Python 脚本 - 未按预期工作

linux - 安装 PostgreSQL 的 Bash 脚本 - 不工作

java - 如何自动化测试以检查 JSF 应用程序的正确性?

javascript - react : TypeError: Cannot read property 'addEventListener' of null

azure - 为什么我的 ASP.NET 应用程序在作为 Azure Web 应用程序托管时无法导出 CSV?

java - 在 Play framework 2.0 中使用 MySQL 数据库所需的步骤

java - 使用 Proguard 在 dist 上混淆 Play 2 网络应用程序?

linux - 将 'sed' 到 'spawn' 执行到预期脚本中