Apache log rotation on Bitnami (Lightsail)

16 views
Skip to first unread message

Mike Witt

unread,
Feb 20, 2021, 1:38:25 PMFeb 20
to mpls-stpau...@googlegroups.com
I guess this is a bit of a long shot, but has anybody here ever
configured log rotation for the http logs on a bitnami lightsail
instance?

Patrick Lewis

unread,
Feb 20, 2021, 7:19:48 PMFeb 20
to Minneapolis St. Paul WordPress User Group
This should be available via logrotate.


It renames the log files with numeric extensions and zips them. It also removes old rotated log files too.

Mike Witt

unread,
Feb 21, 2021, 7:44:32 AMFeb 21
to mpls-stpau...@googlegroups.com
That page is where I started :-) Have you actually done it on Bitnami?
I'm apparently missing something.
> --
> You received this message because you are subscribed to the Google
> Groups "Minneapolis St. Paul WordPress User Group" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to mpls-stpaul-word...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mpls-stpaul-wordpress/719da830-b06a-4266-b772-026664cf4280n%40googlegroups.com.
>

Patrick Lewis

unread,
Feb 21, 2021, 3:42:42 PMFeb 21
to Minneapolis St. Paul WordPress User Group
I'm not sure what actions you have taken, but yes, I have gotten this to work on bitnami. Here is the relevant file to configure.

    /opt/bitnami/config/logrotate/logrotate.d/apache.conf

By default, rotation is set to weekly. Change 'weekly' to 'daily.' Test it with this command.

    sudo logrotate -f /etc/logrotate.d/bitnami.conf

If successful you should be able to see the results here.

    /opt/bitnami/apache2/logs 

You should see date-named, zipped files, as well as new log files.

Mike Witt

unread,
Feb 21, 2021, 4:52:10 PMFeb 21
to mpls-stpau...@googlegroups.com
Patrick,

Thank you so much. I somehow (despite that very file being mentioned in
the documentation) convinced myself that I should actually add the
apache stuff to /etc/logrotate.conf. (Now I'm not sure what I was
thinking :-)

I'm going to go back and do just what you said. Thanks again!

-Mike
> https://groups.google.com/d/msgid/mpls-stpaul-wordpress/9229a498-5bd9-4f58-88de-bc0e032247bdn%40googlegroups.com.
>

Reply all
Reply to author
Forward
0 new messages