nginx-ssl

nginx ssl

80

nginx.conf
1
2
3
4
5
server {
listen 80;
server_name domain.com;
rewrite ^/(.*)$ https://domain.com:443/$1 permanent;
}

443

nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
server {
listen 443 ssl;
server_name domain.com;
ssl_certificate /etc/ssl/1_domain.com_bundle.crt;
ssl_certificate_key /etc/ssl/2_domain.com.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 /home/public;
index index.html index.htm;
}
}
作者

orzMaster

发布于

2021-04-14

更新于

2024-03-18

许可协议

评论