gpt4 book ai didi

java - 如何在 Play Framework 中禁用http端口?

转载 作者:塔克拉玛干 更新时间:2023-11-03 03:16:12 26 4
gpt4 key购买 nike

当我使用 https 端口运行 Play Framework 时,应用程序在两个端口上启动 - 默认 (9000) 和 https (443)。如何禁用默认的 9000 端口并仅在 https 端口上运行 Play 应用程序?

我通过以下命令运行应用程序:

play -Dhttps.port=443 -Dhttps.keyStore=/path/to/keystore -Dhttps.keyStorePassword=password start

我得到了一些日志:

[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000
[info] play - Listening for HTTPS on port /0:0:0:0:0:0:0:0:443

最佳答案

尝试使用http.port=disabled标志

play -Dhttp.port=disabled -Dhttps.port=443 -Dhttps.keyStore=/path/to/keystore -Dhttps.keyStorePassword=password start

关于java - 如何在 Play Framework 中禁用http端口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24864163/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com