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

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.

主站蜘蛛池模板: 宜城市| 涪陵区| 天全县| 泰兴市| 榕江县| 寿阳县| 岳普湖县| 四子王旗| 康乐县| 鲁山县| 瓦房店市| 岚皋县| 晴隆县| 嘉鱼县| 商城县| 哈巴河县| 花垣县| 北票市| 文化| 汶川县| 霍邱县| 达日县| 奉贤区| 贡嘎县| 皮山县| 临沭县| 德江县| 郓城县| 光山县| 疏附县| 静海县| 青阳县| 武穴市| 马尔康县| 方正县| 灵川县| 台南市| 喀喇| 汤原县| 鸡西市| 屏东县|