关于空主机头(开启ssl)
资料:对于开启了https的用户,未添加https站点的域名,也可以https访问,只是会访问默认的https网站并提示不安全、域名证书不匹配。开启SSL后https的空主机头的设置复制内容到剪贴板代码:server {
listen 443 default_server;
server_name _;
ssl on;
ssl_certificate 随便设置一个ssl证书;
ssl_certificate_key 随便设置一个ssl证书的key;
return 500;
}
请问军哥:
关于:随便设置一个ssl证书和 随便设置一个ssl证书的key
我乱打了一堆英文字母(09809jlkjppipoipipipoipoi),重启 nginx报错了,如下:
# lnmp nginx restart
+-------------------------------------------+
| Manager for LNMP, Written by Licess |
+-------------------------------------------+
| https://lnmp.org |
+-------------------------------------------+
Stoping nginx... nginx: BIO_new_file("/usr/local/nginx/conf/09809jlkjppipoipipipoipoip") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/09809jlkjppipoipipipoipoip','r') error:2006D080:BIO routines:BIO_new_file:no such file)
failed. Use force-quit
Terminating nginx...done
Starting nginx... nginx: BIO_new_file("/usr/local/nginx/conf/09809jlkjppipoipipipoipoip") failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/usr/local/nginx/conf/09809jlkjppipoipipipoipoip','r') error:2006D080:BIO routines:BIO_new_file:no such file)
failed
那么开启SSL的,这儿,具体该填啥,能否给个案例,谢谢! ssl_certificate 随便设置一个ssl证书;
ssl_certificate_key 随便设置一个ssl证书的key;
这个虽然说是随便,意思是文件必须要存在啊,而且nginx下记得也必须是真ssl证书(最起码格式要对),不能随便vim编辑个空文本,至于是不是站点的配套的,这个可以随便。
回复 2# 的帖子
明白了哈,谢谢:lol
页:
[1]