[英]NodeJs tls.createServer equivalent to Apache SSLCertificateChainFile?
I have an Apache config for SSL like so: 我有一个SSL的Apache配置,如下所示:
SSLCertificateFile ~/certs/server.crt
SSLCertificateKeyFile ~/certs/server.key
SSLCertificateChainFile ~/certs/bundle.crt
Now in my NodeJs server, I am using grunt with grunt-connect as the server. 现在在我的NodeJs服务器中,我将grunt-connect与grunt-connect一起用作服务器。
The documentation for grunt-connect
says that it can be configured using the following syntax. grunt-connect
文档指出,可以使用以下语法对其进行配置。
grunt.initConfig({
connect: {
server: {
options: {
protocol: 'https',
port: 8443,
key: grunt.file.read('server.key').toString(),
cert: grunt.file.read('server.crt').toString(),
ca: grunt.file.read('ca.crt').toString()
},
},
},
});
I need this configuration to match my Apache configurations. 我需要此配置来匹配我的Apache配置。 It has a certificate file, and a key file, and also a bundle file. 它具有一个证书文件,一个密钥文件以及一个捆绑文件。
Looking at the documentation for the tls.createServer in NodeJs, I do not see an option that looks like it could be equivalent to SSLCertificateChainFile
. 在NodeJs中查看tls.createServer的文档时,我看不到一个选项可能看起来等同于SSLCertificateChainFile
。
How can I make my NodeJs connect server mirror the same SSL configuration as my Apache server? 如何使我的NodeJ连接服务器镜像与我的Apache服务器相同的SSL配置?
I will also award the bounty to someone who can do this: 我还将把赏金授予能够做到这一点的人:
Create a SSCCE Gruntfile
that demonstrates how to configure connect
to accept a server certificate and bundle certificate. 创建一个SSCCE Gruntfile
,演示如何配置connect
以接受服务器证书和捆绑包证书。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.