官术网_书友最值得收藏!

Installing a real SSL certificate

In order to move a secure application out of a development environment and into an internet-exposed environment, a real certificate will need to be purchased. The prices of these certificates has been dropping year by year, and it should be easy to find reasonably priced providers of certificates with a high-enough level of security. Some providers even offer free person-use certificates.

Setting up a professional cert simply requires changing the HTTPS options we introduced previously. Different providers will have different processes and filenames. Typically, you will need to download or otherwise receive from your provider a private .key file, your signed domain certificate .crt file, and a bundle describing certificate chains:

let options = {
key: fs.readFileSync("mysite.key"),
cert: fs.readFileSync("mysite.com.crt"),
ca: [ fs.readFileSync("gd_bundle.crt") ]
};

It is important to note that the ca parameter must be sent as an array, even if the bundle of certificates has been concatenated into one file.

主站蜘蛛池模板: 康乐县| 斗六市| 和政县| 泰州市| 新建县| 呼和浩特市| 慈利县| 始兴县| 柳河县| 泊头市| 江城| 剑川县| 石门县| 阳城县| 湘潭县| 吉林省| 田阳县| 静安区| 新晃| 安陆市| 桦川县| 哈巴河县| 登封市| 西吉县| 鹰潭市| 定兴县| 蓬安县| 澜沧| 清徐县| 集贤县| 惠来县| 来宾市| 濮阳县| 巴东县| 罗甸县| 贡觉县| 高邮市| 玉山县| 九龙坡区| 贵南县| 黔东|