2014-06-10 62 views
0

我試圖從Node.js documentation運行此示例HTTPS服務器。Node.js在IE8上的HTTPS Hello world服務器

var https = require('https'); 
var fs = require('fs'); 

var options = { 
    key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), 
    cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') 
}; 

https.createServer(options, function (req, res) { 
    res.writeHead(200); 
    res.end("hello world\n"); 
}).listen(8000); 

https://localhost:8000/適用於Firefox 29,但不適用於IE8。 「Internet Explorer無法顯示該網頁。」

我也試過this support page來自微軟,但沒有奏效。

這是一個已知的問題嗎?

謝謝。

+0

它應該肯定有效。當您嘗試使用IE8時,請仔細檢查服務器是否已啓動 –

+0

由於我可以通過Firefox進行訪問,所以Yep服務器已啓動。也許IE8不支持pem文件? –

回答

0

這可能是自制的證書有問題。我的IE8寫道:

There is a problem with this website's security certificate. 

您應該點擊:

Continue to this website (not recommended). 

和Hello世界將被顯示。