防止恶意解析:
server { listen 443 default_server; server_name _; ssl on; ssl_certificate /etc/nginx/cert/aaaa.pem; ssl_certificate_key /etc/nginx/cert/aaaa.key; return 403; }
禁止IP直接访问:
#此处禁止ip访问网站 if ($host ~* "\d+\.\d+\.\d+\.\d+"){ return 400; }
防止恶意解析:
server { listen 443 default_server; server_name _; ssl on; ssl_certificate /etc/nginx/cert/aaaa.pem; ssl_certificate_key /etc/nginx/cert/aaaa.key; return 403; }
禁止IP直接访问:
#此处禁止ip访问网站 if ($host ~* "\d+\.\d+\.\d+\.\d+"){ return 400; }