nginx防止被其他域名恶意解析

在nginx对应配置文件中增加以下配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
server {
listen 80 default_server;
listen 443 ssl default_server;
ssl_certificate 证书路径;
ssl_certificate_key 证书路径;
ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
server_name _;
access_log off;
return 403;
}
作者

StoneWu

发布于

2017-11-27

更新于

2023-02-15

许可协议

评论