我有这样的配置
{
"default": {
"port": "443",
"host": "example.com",
"securityLayer": "tls",
"tls": {
"certificates": "files",
"certificateFile": "/etc/letsencrypt/live/example.com/fullchain.pem",
"privateKeyFile": "/etc/letsencrypt/live/example.com/privkey.pem"
}
}
}
在drop
启动时,它会打印出此控制台消息:
No TLS signature supplied, defaulting to selfSigned.
根据产生该错误消息的代码判断,配置中的signature
字段应为selfSigned
,signedFile
或signedDirectory
我有来自let's encrypt
的这些文件:
如何解决该错误消息?
答案 0 :(得分:1)
这应解决问题
{
"default": {
"port": "443",
"host": "example.com",
"securityLayer": "tls",
"tls": {
"signature": "signedFile",
"certificates": "files",
"certificateFile": "/etc/letsencrypt/live/example.com/fullchain.pem",
"privateKeyFile": "/etc/letsencrypt/live/example.com/privkey.pem"
}
}
}
Vapor不建议直接在Vapor中使用SSL证书。
您应该考虑使用ngix或apache作为SSL代理:https://docs.vapor.codes/2.0/deploy/nginx/