<b>在Nginx上配置NameCheap免费SSL</b>[服务器安全]
本文“<b>在Nginx上配置NameCheap免费SSL</b>[服务器安全]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
4月底在NameCheap用优惠码注册了一个JunGeHost.com,并且免费赠送了一年的Positive SSL,于是趁便搞上SSL,这样传输数据也越发安全.SSL需求有一个独立IP,也就是一个独立IP只能对应一个SSL.(什么是SSL?)
1、预备工作
1、需求Nignx已经编译ssl 模块(lnmp一键安装包已经编译安装上),假如没有需求重新编译,办法可以参考Nginx无缝进级.
2、再NameCheap已注册/转移域名或购置主机产品,且购置是在购物车上增添了免费SSL.
2、利用OpenSSL生成证书 (注:一下蓝色加粗字为履行时输入的号令!)
1、生成RSA密钥
li88-99:~# cd /usr/local/nginx/conf/ li88-99:/usr/local/nginx/conf# openssl genrsa -out jungehost.pem 2048 Generating RSA private key, 2048 bit long modulus |
2、生成一个证书恳求
li88-99:/usr/local/nginx/conf# openssl req -new -key jungehost.pem -out jungehost.csr You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:CN //输入国家简写 Please enter the following 'extra' attributes |
按上面的注释输入相关信息后,会在目录下面生成jungehost.csr这个文件,履行cat jungehost.csr
将下面以—–BEGIN CERTIFICATE REQUEST—–开首到—–END CERTIFICATE REQUEST—–末尾的全部内容复制下来.需求利用这个jungehost.csr去NameCheap生成数字证书.
li88-99:/usr/local/nginx/conf# cat jungehost.csr -----BEGIN CERTIFICATE REQUEST----- MIIBzTCCATYCAQAwgYwxCzAJBgNVBAYTAkNOMREwDwYDVQQIEwhTaGFuRG9uZzEO MAwGA1UEBxMFSmlOYW4xEjAQBeNVBAoTCUp1bkdlSG9zdDEOMAwGA1UECxMFanVu Z2UxEjAQBgNVBAMTCVNoaUp1baBMaTEiMCAGCSqGSIbcDQEJARYTYWRtaW5AanVu Z2Vob3N0LmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0R9hda1NJdoO 2tbvHevVY3fdpdn8ESpSewHC9yc9zVoc0tz9Ww5EfpDV9L222xv/Z8DlDf2pUfIG X7F15qIQJZ/VCUDNxS5Y7bjNTzduMq8yQnqkB6h/dpnlFTJlDQrAl6vaoOhBcB5L hMLAQBf1V8800MIn3nfxb9E6aoydSk8CAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4GB AJxQOaFHra/ILos8+HO8Wn/2bhfWAUR4ovyRGKMB/n0BQlHPfNhKbILRv9KI5EUL dc6HCf3AALetjNiPHrfpJOCj4Ljqchu3WeodthuwRd9hzhZHCf43UiopofbfRzMp lmAJFuUwN93IgFSrslCh66JaQceNa5x/TQIsmviuKZGC -----END CERTIFICATE REQUEST----- |
以上是“<b>在Nginx上配置NameCheap免费SSL</b>[服务器安全]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |