apache2 with broken logrotate config (incl Fix)

Bug #2072480 reported by Thomas

This bug report was marked for expiration 0 days ago. (find out why)

12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Apache2 in Package:

ii apache2 2.4.58-1ubuntu8.1 amd64 Apache HTTP Server

contains a broken logrotate Config.

Output of Systemd -> Logrotate:

```
Jul 02 00:00:00 mysys systemd[1]: Starting logrotate.service - Rotate log files...
Jul 02 00:00:00 mysys logrotate[1043990]: logrotate_script: 2: rotate: not found
Jul 02 00:00:00 mysys logrotate[1043990]: logrotate_script: 4: Syntax error: "fi" unexpected
Jul 02 00:00:00 mysys logrotate[1043953]: error: error running shared prerotate script for '/var/log/apache2/*.log '
Jul 02 00:00:00 mysys systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
Jul 02 00:00:00 mysys systemd[1]: logrotate.service: Failed with result 'exit-code'.
Jul 02 00:00:00 mysys systemd[1]: Failed to start logrotate.service - Rotate log files.
```

Broken part:
```
...
       sharedscripts
        prerotate
        rotate 356
                        run-parts /etc/logrotate.d/httpd-prerotate
                fi
        endscript
```

I Think the following Line is missung above the run-parts

```
                if [ -d /etc/logrotate.d/httpd-prerotate ]; then
```

Revision history for this message
Thomas (tux12fun) wrote :

Ubuntu 24.04 LTS is affected

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apache2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for taking the time to report this bug and trying to make Ubuntu better.

I believe what you described above is happening due to a local config change. I checked the source package and the debian/apache2.logrotate file is correct. I also created a Ubuntu Noble (24.04) container, installed apache2 and the logrotate config is correct. Could you please make sure you did not change anything locally?

Changed in apache2 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Thomas (tux12fun) wrote :

Thank you for yur Response.

I tested this now on a new fresh installation and cound't also reproduce the behvior.

Please close the Ticket.

Revision history for this message
ufanews123 (ufanews) wrote :

สล็อต 1 บาท สล็อตออนไลน์ เว็บสล็อตออนไลน์ รวมค่ายสล็อต PG Slot แตกง่าย อัตราชนะสูง เดิมพันไม่มีขั้นต่ำ

https://line.me/ti/p/~@UFANEWS123

เว็บสล็อตออนไลน์ปั่นแตกง่าย
สล็อตออนไลน์เกมใหม่ล่าสุด อัปเดตเกมใหม่ทุกวัน
สล็อตล่าสุด สุสานแห่งโชค ลุ้นเพลินปั่นยังไงก็แตก
TOMB OF GOLD
สนใจคลี๊กadd line : @UFANEWS123 (มี@นำหน้าด้วยนะคะ)
เกมสล้อตไม่มีขั้นต่

#เว็บสล็อต #เกมสล็อต #เกมสล้อต #สล้อต #สล็อต #สลอต #สล็อตออนไลน์ #เว็บสล็อตเว็บตรง #สล็อตแตกง่าย #สล็อต1บาท #เว็บสล็อตอันดับ1

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.