Can you ignore a page in the apache log?

0

I'm developing a page which will permanently query via Ajax, it happens that the Apache Access Log will fill up very quickly and this brings me a server space problem, I was wondering how to handle this, one solution would be to ignore only the page where Ajax is, as I see no need to monitor it.

I know we can do multiple logs in Apache, but I do not know if we can skip or choose certain folders or server pages.

Would it be possible?

    
asked by anonymous 11.01.2018 / 12:41

1 answer

1

Based on 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 in your .htaccess

    
11.01.2018 / 13:46