HTTPS站点(nginx)怎么禁止ip访问?
如何禁止IP直接访问HTTPS
nginx里如下设置:
server {
listen 80;
listen 443 ssl spdy;
root /data0/web/domain.com;
server_name domain.com *.domain.com;
index index.html index.htm index.php;
location / {
}
}
##default
server {
listen 80 default;
listen 443 default;
server_name _;
root /data0/web/empty;
location / {
return 500;
}
}
如上设置,访问 https://ip 。SSL无法工作。即便访问 https://domain.com 也无法访问。
千酱ど露酱
11 years, 6 months ago