Can you ignore a page in the apache log?

Asked

Viewed 25 times

0

I’m developing a page which will permanently consult via Ajax, it turns out that the Apache access log will fill up very quickly and this brings me a problem of server space, I wondered how to treat this, a solution would be to ignore only the page where Ajax is, because I see no need to monitor it.

I know we can do multiple logs in apache, but I don’t know if we can skip or choose certain folders or server pages.

Would it be possible?

1 answer

1


Based on the DOCS, in the "Conditional Logs" section we can see:

# Não incluir nos logs caso a requisição venha do ip abaixo
SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog
# Não incluir nos logs o request abaixo, este é o que tu queres
SetEnvIf Request_URI "^/robots\.txt$" dontlog
# Incluir tudo o resto
CustomLog logs/access_log common env=!dontlog

Put what you need into your . htaccess

  • um... exactly what I need

Browser other questions tagged

You are not signed in. Login or sign up in order to post.