圖文申請步驟如下:
1、產品與服務 -> 安全(雲盾) -> SSL證書(應用安全)
2、購買證書
3、免費型DV SSL + Symantec + 1個域名 -> 立即購買
4、立即支付
5、支付成功 -> 證書控制檯
6、申請
7、填寫域名等一系列信息 -> 下一步
8、驗證 -> 提交審覈
9、審覈通過後 -> 下載
10、我這邊下載nginx版本的證書
11、上傳證書跟密鑰到服務器,配置nginx
server {
server_name xxx.com;
charset utf8;
#監聽443端口
listen 443;
#ssl配置
ssl on;
ssl_certificate /etc/ssl/2384729.pem; #證書路徑
ssl_certificate_key /etc/ssl/2384729.key; #密鑰路徑
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
root /srv/www/miniprogram;
index index.html index.htm index.php;
#根目錄的重寫規則
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
break;
}
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ \.php$ {
root /srv/www/miniprogram;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
#配置http直接跳轉https
server{
listen 80;
server_name xxx.com;
rewrite ^/(.*)$ https://xxx.com:443/$1 permanent;
}
12、配置服務器防火牆通過443端口,重啓nginx服務,直接訪問https://xxx.com即可