Nginxconfiguration:log_not_found不能正常工作

我不明白为什么log_not_foundclosures不能与try_files工作。 错误“失败(2:没有这样的文件或目录)”总是保存在error_log中

没有try_files, log_not_foundclosures工作完美

我的configuration:

location ~* \.(js|css|bmp|png|jpg|jpeg|gif|swf)$ { try_files $uri = 404; log_not_found off; } location ~* \.(.*)$ { try_files $uri @rewrite; } location @rewrite { rewrite ^(.*) .....; } 

感谢Alexey Ten(在评论中)以及公众Google用户的好处:

"There must be no space between = and 404