nginx 禁用通过域名直接访问页面
参考 https://www.codedodle.com/disable-direct-ip-access-nginx.html
server {
listen 80 default_server;
# 下面两行, 需要 按照 ssl_reject_handshake 这个 NGINX module 才可以~
# listen 443 ssl default_server;
# ssl_reject_handshake on;
server_name _;
return 404;
}
标签:禁用,server,ssl,域名,reject,页面
From: https://www.cnblogs.com/whm-blog/p/17613882.html