解决方法是在的配置文件中nginx.conf加入一个处理默认server的项目:

nginx关闭默认站点的办法

server {

listen 80 default_server;

server_name _;

return 444;

}

胜象大百科