Apache HTTP Server /etc/logrotate.d/apache2

Original 📋 Alpine Linux v3.21 10 lines

Works On

Viewing:
Alpine Linux v3.21
Same on:
Other versions:

Details

Size
10 lines
MD5
8519af87c57b50441866ad4216e4d663
SHA256
8e2a8870d51796cf04cc7d8985c43e36afe9ae79e2d6765050a0e72c0de8dce7
/etc/logrotate.d/apache2
/var/log/apache2/*log {
    missingok
    notifempty
    sharedscripts
    delaycompress
    postrotate
        /etc/init.d/apache2 --quiet --ifstarted reload > /dev/null 2>/dev/null || true
    endscript
}

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/8519af87c57b50441866ad4216e4d663?hint=apache2
wget:
wget -O apache2 https://exampleconfig.com/api/v1/config/original/8519af87c57b50441866ad4216e4d663?hint=apache2

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/8519af87c57b50441866ad4216e4d663?hint=apache2' /><config><app>Apache HTTP Server</app><os>Alpine Linux v3.21</os><location>/etc/logrotate.d/apache2</location><lines>10</lines><md5>8519af87c57b50441866ad4216e4d663</md5><sha256>8e2a8870d51796cf04cc7d8985c43e36afe9ae79e2d6765050a0e72c0de8dce7</sha256></config></prompt>

Paste into Claude, ChatGPT, or any AI assistant.

Install Apache HTTP Server

Alpine Linux

sudo apk add apache2

Debian

sudo apt update && sudo apt install apache2

Red Hat Enterprise Linux

sudo yum install httpd

Ubuntu

sudo apt update && sudo apt install apache2

File Location

File Path
/etc/logrotate.d/apache2
Directory
/etc/logrotate.d/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this apache2?

Use it to restore a missing default, confirm what shipped, or diff against your current Apache HTTP Server config.

How do I restore Apache HTTP Server defaults?

Download the file, back up the current one in /etc/logrotate.d/apache2, replace it, then reload or restart Apache HTTP Server.

Is apache2 safe for production?

It is the vendor default for Alpine Linux v3.21. Treat it as a baseline and review security and performance settings before production use.

How does this differ from other OS versions?

Defaults vary by distro and version. This copy matches Alpine Linux v3.21.

Can I use this for Apache HTTP Server troubleshooting?

Yes. Diff it against yours to find drift, then restore only the sections you need.