【发布时间】:2016-03-02 21:08:32
【问题描述】:
我在 Azure VM Windows Server 2012 R2 Datacenter 中部署了一个 Suave 自托管 Web 应用程序,可以从 http://localhost:9001 访问它,并试图让它从 VM 外部访问在http://[my-vm-name].cloudapp.net:9001。
这是一个简单的Hello world:
[<EntryPoint>]
let main args =
startWebServer { defaultConfig with bindings = [ Types.HttpBinding.mk' Types.HTTP "127.0.0.1" 9001 ] } (OK "Hello world")
0
我已经有了:
我找到的所有解决方案/教程都没有指定比我已经做过的更多的细节,但我仍然无法从 VM 外部访问我的 web 应用程序。我还缺少什么?
【问题讨论】:
-
这属于Server Fault
-
@DanielA.White 这里是 Suave 的作者,不,不是。错误是他绑定到“127.0.0.1”而不是例如"0.0.0.0" 或 VM 的公共可路由 IP。
-
感谢@Henrik 检查。在 Brad L. 建议我确保绑定到所有地址/接口而不仅仅是 localhost 之后,我设法弄清楚了。
标签: azure f# self-hosting suave