打开网站,用谷歌浏览器查看host
修改nginx配置文件
vim nginx.conf
server {
#内网地址:192.168.59.103 端口号:80,映射到外网:XXX:XXX:XX:XXX:18083
server_name 上面查看到到Host(比如:192.168.59.103:18083);
listen 80;
#if ($http_Host !~*^上面查看到到Host(比如:192.168.59.103:18083)$)
if ($http_Host !=‘上面查看到到Host(比如:192.168.59.103:18083)’)
{
return 403;
}
}
}
标签:59.103,HTTP,URL,XXX,192.168,nginx,Host,18083 From: https://www.cnblogs.com/leihongnu/p/16659023.html