Apache HTTP Server /etc/logrotate.d/httpd

Original 📋 Red Hat Enterprise Linux 9 (Plow) 11 lines

Works On

Viewing:
Red Hat Enterprise Linux 9 (Plow)
Same on:
CentOS Stream 9
Other versions:

Details

Size
11 lines
MD5
f48c31ee7ebf35f96e3f8391955d8fa9
SHA256
a71aa6fa2a14b8835ff8be409c4bd00c015ebc2d749396682fb1ea9ad9ca9bfc
/etc/logrotate.d/httpd
# Note that logs are not compressed unless "compress" is configured,
# which can be done either here or globally in /etc/logrotate.conf.
/var/log/httpd/*log {
    missingok
    notifempty
    sharedscripts
    delaycompress
    postrotate
        /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
    endscript
}

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/f48c31ee7ebf35f96e3f8391955d8fa9?hint=httpd
wget:
wget -O httpd https://exampleconfig.com/api/v1/config/original/f48c31ee7ebf35f96e3f8391955d8fa9?hint=httpd

For AI Agents

<prompt><role>DevOps agent</role><source url='https://exampleconfig.com/api/v1/config/original/f48c31ee7ebf35f96e3f8391955d8fa9?hint=httpd' /><config><app>Apache HTTP Server</app><os>Red Hat Enterprise Linux 9 (Plow)</os><location>/etc/logrotate.d/httpd</location><lines>11</lines><md5>f48c31ee7ebf35f96e3f8391955d8fa9</md5><sha256>a71aa6fa2a14b8835ff8be409c4bd00c015ebc2d749396682fb1ea9ad9ca9bfc</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/httpd
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 httpd?

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/httpd, replace it, then reload or restart Apache HTTP Server.

Is httpd safe for production?

It is the vendor default for Red Hat Enterprise Linux 9 (Plow). 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 Red Hat Enterprise Linux 9 (Plow).

Can I use this for Apache HTTP Server troubleshooting?

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