如果不是自簽證書 需要先合并證書
cat www.example.com.crt bundle.crt > www.example.com.chained.crt
對(duì)于單個(gè)站點(diǎn)(需要注意服務(wù)器防火墻是否允許訪問443)
server {
listen? ? ? ? ? ? ? 443 ssl;
server_name? ? ? ? www.example.com;
ssl_certificate? ? www.example.com.chained.crt;
ssl_certificate_key www.example.com.key;
...
}
https和http
server {
listen? ? ? ? ? ? ? 80;
listen? ? ? ? ? ? ? 443 ssl;
server_name? ? ? ?? www.example.com;
ssl_certificate? ?? www.example.com.chained.crt;
ssl_certificate_key www.example.com.key;
...
}