为本身的服务器,系统为centos配置https协议,腾讯云里有教程,可是较为简略。碰见了一些问题,记录下来php
nginx: [emerg] BIO_new_file("/etc/nginx/NginxCertificate/1_www.domain.com_bundle.crt") failed (SSL: error:02001002:system library:fopen:No such file ordirectory:fopen('/etc/nginx/NginxCertificate/1_www.domain.com_bundle.crt','r') error:2006D080:BIO routines:BIO_new_file:no such file)
把教程中的代码拷贝到Nginx.conf 文件中后,修改本身的域名,后出现错误。nginx
看报错应该是文件路径的缘由,因而便更改证书路径,代码为:
shell
运行 测试centos
nginx -t
测试经过。点击预览服务器