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

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.

主站蜘蛛池模板: 桐庐县| 新平| 米林县| 洞头县| 沙湾县| 溆浦县| 赤壁市| 永城市| 武冈市| 全椒县| 千阳县| 广东省| 隆回县| 柳江县| 伊春市| 连山| 西充县| 江西省| 永登县| 青阳县| 临洮县| 定南县| 历史| 衢州市| 皋兰县| 迁西县| 通榆县| 迁西县| 康保县| 承德县| 峨山| 肃南| 伊金霍洛旗| 北流市| 项城市| 鹿邑县| 泰和县| 饶河县| 都昌县| 上虞市| 衢州市|