Reducing log

my nginx log example.com.error.log1 & 2 & 3 & 4 fill up my disk about 2~3gb each before compress, after archived is about 200~300mb each, can someone help, thank in advance

Like auto cleaning old logs?

yes if able to limit it to 8~10 logs, is the hugh log size seen as normal ? tq

Hi @RoldanLT

You may edit the following logrotate config. file to suit your needs :

/etc/logrotate.d/nginx

Refer this tutorial.

Thanks.

great i will give it a try, report back, thank you

thanks all, it works for me but i found that mysql ie mariadb-bin.000200 keep logging hugh and many.