nginx的https配置
server {
listen 443 ssl; # https端口监听,必须跟上ssl标识。
server_name localhost;
# PEM是一种将二进制数据编码为字符串的方法。
# 如果对面给的文件里面,没有PEM结尾的,找cer结尾的也行,将其尾缀直接改为pem就行。
# 因为cer指的是证书certificate,通常是DER编码格式的,也可以是PEM格式,也就是说cer是个后缀名,内容可以是DER编码或者PEM编码。
ssl_certificate /opt/cert.pem;
ssl_certificate_key /opt/cert.key;
location / {
root html;
index index.html index.htm;
}
}
发布者:songJian 点击数:40 发布时间:2023-08-18 14:05:25 更新时间:2023-08-18 14:05:25
正在加载评论...