How to clean nginx error.log file?

Keywords: WordPress + NGINX + SSL - Google Cloud Platform - Technical issue - Other
bnsupport ID: 64ad2781-b3a0-bfd7-63aa-8a4254223ea8
My error.log file from nginx is very large (280mb). How can I clean this file and limit its size?

Currently I can’t see the end of the file on the nano, because it’s too big.


Hello @guilesgarcia,

Could you please take a look at our logrotate documentation?

I hope it helps

Thanks for the answer!
I ran the command, but presented the following error:

sudo logrotate -f /etc/logrotate.d/bitnami.conf
error: cannot stat /etc/logrotate.d/bitnami.conf: No such file or directory

Can you help me?

Hello @guilesgarcia,

Yes, there is a typo in the documentation and we will fix it. You should instead execute:

 sudo logrotate -d /etc/logrotate.d/nginx
 sudo logrotate -f /etc/logrotate.d/nginx


1 Like

Thank you so much for helping me, this worked perfectly!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.