Setting up SSL with pairs
I have a configuration like this
{
"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"
}
}
}
First, drop
it prints out this console message:
No TLS signature supplied, defaulting to selfSigned.
Judging by the code that generates this error message, it expects that the config is signature
a field that will either selfSigned
, signedFile
orsignedDirectory
I have these files from let encrypt
:
- cert.pem
- chain.pem
- fullchain.pem
- privkey.pem
What should I do to resolve this error message?
source to share
This should fix the problem
{
"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 does not recommend using SSL certificate directly in Vapor.
You must use ngix or apache as SSL proxy: https://docs.vapor.codes/2.0/deploy/nginx/
source to share