Nginx配置SSL证书

配置示例

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
server {
listen 443 ssl;
server_name wxapi.aimiter.com;
root html;

index index.html index.htm;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/cert.key;

ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;

ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;



location / {
# resolver 127.0.0.1;
proxy_pass http://127.0.0.1:8080;
#root /usr/share/nginx/html;
index index.html index.htm;
}

#error_page 404 /404.html;

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

}
文章作者: Spaceack
文章链接: http://spaceack.com/2019/09/23/2019-09-23-Nginx%E9%85%8D%E7%BD%AESSL%E8%AF%81%E4%B9%A6/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 丸子家的小云吞
支付宝打赏
微信打赏