nignx服務器SSL證書安裝部署

獲取服務器證書文件

下載好壓縮包,解壓nignx格式證書server.crt

  1. 安裝服務器證書 複製 server.key、server.crt 文件到 Nginx 安裝目錄下的 conf 目錄。

打開 Nginx 安裝目錄下 conf 目錄中的 nginx.conf 文件

找到 # HTTPS server

#

#server {

listen 443;

server_name localhost;

ssl on;

ssl_certificate cert.crt;

ssl_certificate_key cert.key;

ssl_session_timeout 5m;

ssl_protocols SSLv2 SSLv3 TLSv1;

ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MED IUM:+LOW:+SSLv2:+EXP;

ssl_prefer_server_ciphers on;

location / {

root html;

index index.html index.htm;

}****

#}

將其修改爲

server { listen 443;

server_name localhost;

ssl on; ssl_certificate server.crt;

ssl_certificate_key server.key;

ssl_session_timeout 5m;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

ssl_ciphers ECDH:AESGCM:HIGH:!RC4:!DH:!MD5:!aNULL:!eNULL;

ssl_prefer_server_ciphers on;

location / {

root html;

index index.html index.htm;

}

 }

保存退出,並重啓 Nginx。 通過 https 方式訪問您的站點,測試站點證書的安裝配置。

本文由SSL盾小編整理髮布【www.ssldun.com】網站安全之盾

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章