我似乎无法在Ubuntu12.04下使用Express3的V0.10.3 NodeJS应用程序上使用SSL。我在Chrome中看到以下错误:
Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error
我的app.js文件中包含以下内容:
var privateKey = fs.readFileSync('./ssl/private.key');
var certificate = fs.readFileSync('./ssl/cert.crt');
var godaddy = fs.readFileSync('./ssl/gd_bundle.crt');
var options = {
key: privateKey,
cert: certificate,
ca: godaddy
};
https.createServer(options, app).listen(3000, function(){
console.log("Express https server listening on port 3000");
});
使用自签名证书的类似设置在我的开发盒上工作得很好。你知道我哪里错了吗?
发布于 2013-04-10 02:17:00
如果它可以在Firefox上运行,但不能在Chrome上运行,那么请检查Chrome中的设置。
<代码>G29
发布于 2013-04-10 03:29:36
不过,由于你的帮助,我得到了working...thanks。我一定是遇到了某种文件级的问题,因为当我从备份中恢复ssl文件时,它起作用了。
https://stackoverflow.com/questions/15899409
复制相似问题