由于网上已经存在很多关于nginx配置ssl的文章,我在这里仅简单做个示例,不多赘述。
修改 /etc/nginx/conf.d/default.conf
(配置文件的路径受安装方式的影响)
#https://www.example.com
server {
listen 443 ssl http2;
server_name www.example.com;
ssl_certificate 0000000_example.com.pem;
ssl_certificate_key 0000000_example.com.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2 TLSv1.3;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
}
sudo /etc/init.d/nginx check-reload
文章评论
好
nice