How to fix nginx logrotate error

→ Are you a new visitor? Please visit the page guidance for new visitors ←

How to fix nginx logrotate error

Today I’m going to show you simply how to fix nginx logrotate error, error which I cam across recently while checking my VPS settings and emails.

I know its been a long since my last article, but do believe me I’ve been so busy that I forgot about me entirely.

In any case, let’s just go back to business. The error I’m referring is:

While this is not an issue at all, just letting you know that the logs are skipping nginx due to not finding any logs, it can be annoying if you set to receive root emails to your own email.

So after checking my vps settings and email, stumbled on this error which came up in my email and so I thought I should remove it/clear it so that everything is ok.

Why do you have this error?

The logrotate is set automatically when you install nginx on your server, basically when you remove nginx, logrotate ngix file is not being removed for some reason. This file location can be found here:

How to fix nginx logrotate error?

Fixing this is really easy, if you removed nginx, you no longer need the logrotate script for nginx. Basically you just need to remove the script.

Afterwards you can test it by running the logrotate cron manually:

No more errors should be reported by the logrotate script at this point.

So that’s it, simple fix, simple error,
Cheers!

Request an article ←