阿里云配置小程序证书 https总结
生活随笔
收集整理的這篇文章主要介紹了
阿里云配置小程序证书 https总结
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
第一條 nginx.conf的配置過程中 請先另存一份 修改了兩次其他的文件沒動,但是nginx啟動不了 ,估計是bom頭的原因
操作步驟
步驟1:登錄阿里后臺 –> 證書服務(wù) –> 點擊購買證書(像商品購買)?
步驟2:購買后按提示綁定域名,提交等待審核(一般20分鐘左右)?
步驟3:審核通過后,在我的證書訂單列表中點擊下載,進入選擇下載對應(yīng)不同服務(wù)器類型(apache, nginx, iss…)的證書文件(.pem, .key)?
步驟4:按提示的配置信息,上傳剛下載的兩個證書文件到服務(wù)器,并配置nginx.conf?
步驟5:nginx.conf 配置文件中添加:注要監(jiān)聽443 商品
配置文件:
server {# 監(jiān)聽443 端口listen 443;server_name www.xxx.com xxx.com;ssl on; # root html; # index index.html index.htm;# 證書路徑ssl_certificate /alidata/server/nginx-1.4.4/conf/cert/214134739980111.pem;# 私鑰路徑ssl_certificate_key /alidata/server/nginx-1.4.4/conf/cert/214134739980111.key;# 緩存有效期ssl_session_timeout 5m;ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;# 安全鏈接可選的加密協(xié)議ssl_protocols TLSv1 TLSv1.1 TLSv1.2;ssl_prefer_server_ciphers on;# 自定義部分, 注釋了模板上面的二行index index.html index.htm index.php;root /alidata/www/www.xxx.com;error_page 404 /404.html;location ~ .*\.(php|php5)?${#fastcgi_pass unix:/tmp/php-cgi.sock;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;include fastcgi.conf;}location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${expires 30d;}location ~ .*\.(js|css)?${expires 1h;}# rewrite, loginclude /alidata/server/nginx/conf/rewrite/www.xxx.com.conf;access_log /alidata/log/nginx/access/www.xxx.com.log; }- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
步驟6: 重啟服務(wù): /etc/init.d/nginx restart
總結(jié)
以上是生活随笔為你收集整理的阿里云配置小程序证书 https总结的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 手机游戏服务器使用UDP还是TCP
- 下一篇: bzoj 1539: [POI2005]