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;
}

redis批量删除key

redis-cli -h ipaddress -p redis端口 keys "key前缀*" |xargs redis-cli -h ipaddress -p redis端口 del