如何使用limit\ U conn和limit\ U req禁用nginx日志记录?
如何完全禁用HttpLimitConnModule和HttpLimitReqModule的日志记录 在DOS攻击情况下,至少限制大量日志记录造成的损害。我仍然需要一些错误日志记录,但不是在请求被拒绝时 这些信息:如何使用limit\ U conn和limit\ U req禁用nginx日志记录?,nginx,Nginx,如何完全禁用HttpLimitConnModule和HttpLimitReqModule的日志记录 在DOS攻击情况下,至少限制大量日志记录造成的损害。我仍然需要一些错误日志记录,但不是在请求被拒绝时 这些信息: 2013/07/12 20:20:10[error]31544#0:*78限制请求,超出:0.519按区域“限制”,客户端:*******,服务器:example.com,请求:“GET/static.html HTTP/1.1”,主机:“example.com”,引用者:“一个解决方
2013/07/12 20:20:10[error]31544#0:*78限制请求,超出:0.519按区域“限制”,客户端:*******,服务器:example.com,请求:“GET/static.html HTTP/1.1”,主机:“example.com”,引用者:“
一个解决方案是在需要的地方启用错误日志
server {
error_log /dev/null crit;
location ~\.php$ {
error_log /var/log/nginx_error.log;
}
}