如何在play框架中禁用http端口?

问题描述 投票:9回答:1

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

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

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

我得到一些日志:

[info] play - 应用程序启动(Prod) [info] play - 在/ 0上侦听HTTP:0:0:0:0:0:0:0:9000 [info] play - 在端口/ 0上侦听HTTPS:0:0:0:0:0:0:0:443

java scala playframework playframework-2.0
1个回答
11
投票

尝试使用http.port = disabled标志

play -Dhttp.port=disabled -Dhttps.port=443 -Dhttps.keyStore=/path/to/keystore -Dhttps.keyStorePassword=password start
© www.soinside.com 2019 - 2024. All rights reserved.