asdoify 发表于 2017-7-12 10:40:52

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

http://www.xxx.com/ 444
http://www.xxx.com/zzzz正常访问



下面的不好使
                        if ($document_uri = '') {
                                return 444;
                        }

wuxudd 发表于 2017-7-12 10:43:02

location= / {

    return 404;
}

shc 发表于 2017-7-12 10:46:08

server {
error_page 500 502 503 504 =444 @blackhole;

location @blackhole {
    return 444;
}
}

https://stackoverflow.com/questions/41421111/http-444-no-response-instead-of-404-403-error-pages

asdoify 发表于 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

不 对
页: [1]
查看完整版本: nginx怎么在没有URI时返回444?