[英]How to disable http port in play framework?
When I run Play Framework using https port, application starts on two ports - default (9000) and https (443). 当我使用https端口运行Play Framework时,应用程序在两个端口上启动 - 默认(9000)和https(443)。 How to disabled default 9000 port and run the Play application ONLY on https port? 如何禁用默认9000端口并仅在https端口上运行播放应用程序?
I run application through the following command: 我通过以下命令运行应用程序:
play -Dhttps.port=443 -Dhttps.keyStore=/path/to/keystore -Dhttps.keyStorePassword=password start
I get some logs: 我得到一些日志:
[info] play - Application started (Prod) [info] play - 应用程序启动(Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000 [info] play - 在/ 0上侦听HTTP:0:0:0:0:0:0:0:9000
[info] play - Listening for HTTPS on port /0:0:0:0:0:0:0:0:443 [info] play - 在端口/ 0上侦听HTTPS: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
不幸的是,在Gradle Play插件中无法以相同的方式完成,请参阅: https : //github.com/gradle/playframework/issues/85
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.