The thinkphp framework we are using now uses the index.php file for all requests. Since the business uses some scheduled tasks, there are a lot of requests. It is of little significance to record these requests in the log, so I want to close this request. url directory
http://www.test.com/cron/aaaa
http://www.test.com/cron/bbbb
When I use the following command, I find that 404 is always returned. nginx regards the /cron url directory as the physical /cron directory on the disk, so it cannot find the 404 returned directly, and the website actually uses index. .php?m=index&c=cron&a=aaaa This kind of structure, how should I configure the closing log function under nginx?
location ^~ /cron {
access_log off;
error_log /dev/null;
}
You have not configured how to handle this path. Try writing if in the original configuration.