Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
330 views
in Technique[技术] by (71.8m points)

Nginx server_name 未命中依旧能够访问进来的原因

为什么在没有找到匹配的server_name的情况下会访问 listen default_server 或者第一个server配置,还需要自己做一个404的返回判断如下,而不是自动的返回404
`server {
listen ? ? ?80;
server_name ?_;
return 404;
}`


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...