Skip to content

Commit

Permalink
fix: 修改nginx配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
dokidokikoi committed Sep 24, 2023
1 parent e25e464 commit 4cad0bc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion nginx/blog.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@ server {
listen 443 ssl;
server_name harukaze.top;

ssl_certificate /app/conf/harukaze.top.crt; # 证书文件的路径
ssl_certificate /app/conf/harukaze.top_bundle.crt; # 证书文件的路径
ssl_certificate_key /app/conf/harukaze.top.key; # 证书私钥文件的路径
ssl_session_timeout 5m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;

root /usr/share/nginx/html;
index index.html;
Expand Down Expand Up @@ -43,3 +47,12 @@ server {
deny all;
}
}

server {
listen 80;
#请填写绑定证书的域名
server_name harukaze.top;
#把http的域名请求转成https
return 301 https://$host$request_uri;
}

0 comments on commit 4cad0bc

Please sign in to comment.