全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1511|回复: 3

nginx怎么在没有URI时返回444?

[复制链接]
发表于 2017-7-12 10:40:52 | 显示全部楼层 |阅读模式
http://www.xxx.com/ 444
http://www.xxx.com/zzzz  正常访问



下面的不好使
                        if ($document_uri = '') {
                                return 444;
                        }
发表于 2017-7-12 10:43:02 | 显示全部楼层
location  = / {
  
    return 404;
}
发表于 2017-7-12 10:46:08 | 显示全部楼层
  1. server {
  2. error_page 500 502 503 504 =444 @blackhole;

  3.   location @blackhole {
  4.     return 444;
  5.   }
  6. }
复制代码


https://stackoverflow.com/questions/41421111/http-444-no-response-instead-of-404-403-error-pages
 楼主| 发表于 2017-7-12 10:53:44 | 显示全部楼层
shc 发表于 2017-7-12 10:46
https://stackoverflow.com/questions/41421111/http-444-no-response-instead-of-404-403-error-pages

不 对
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-4-26 14:17 , Processed in 0.056403 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表