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

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.

主站蜘蛛池模板: 锡林浩特市| 观塘区| 大新县| 通渭县| 宜兰县| 昭平县| 琼结县| 依兰县| 迭部县| 临沂市| 武清区| 阳江市| 靖州| 法库县| 洞口县| 民权县| 波密县| 韶山市| 大悟县| 宁蒗| 东光县| 睢宁县| 长岛县| 方正县| 二连浩特市| 双城市| 浦城县| 朝阳县| 绥滨县| 方山县| 平谷区| 庆城县| 育儿| 攀枝花市| 扎囊县| 休宁县| 辽阳市| 仁寿县| 永顺县| 基隆市| 屏南县|