[PR #1140] [MERGED] Adds logrotation #3379

Closed
opened 2026-02-26 08:30:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/1140
Author: @chaptergy
Created: 5/30/2021
Status: Merged
Merged: 7/11/2021
Merged by: @jc21

Base: developHead: adds-logrotation


📝 Commits (8)

  • d16bf7d Adds explicit names to dev containers
  • deca493 Splits access and error logs for each host
  • 289d179 Adds logrotate
  • bd3a13b Also rotate other logs
  • fae848b Store host logs in subfolders
  • b7b150a Run logrotation binary from program
  • 56c317d All logs in single folder
  • 673f40b Removes force parameter from logrotate

📊 Changes

12 files changed (+76 additions, -18 deletions)

View changed files

📝 backend/setup.js (+21 -1)
📝 backend/templates/dead_host.conf (+2 -1)
📝 backend/templates/default.conf (+2 -1)
📝 backend/templates/letsencrypt-request.conf (+2 -1)
📝 backend/templates/proxy_host.conf (+2 -2)
📝 backend/templates/redirection_host.conf (+2 -1)
📝 docker/Dockerfile (+4 -1)
📝 docker/dev/Dockerfile (+2 -1)
📝 docker/docker-compose.dev.yml (+10 -4)
docker/rootfs/etc/logrotate.d/nginx-proxy-manager (+25 -0)
📝 docker/rootfs/etc/nginx/conf.d/default.conf (+2 -2)
📝 docker/rootfs/etc/nginx/nginx.conf (+2 -3)

📄 Description

This PR adds logrotation to the access and error logs of the hosts. both are rotated weekly. For access logs the last 4 files (=4 weeks) are kept, for error logs the last 10 files are kept.

Running performing the dry-run with

logrotate -d /etc/logrotate.d/nginx-proxy-manager

seems to work as expected, however we will have to wait to see if it actually does everything as expected.

Fixes https://github.com/jc21/nginx-proxy-manager/issues/183.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/NginxProxyManager/nginx-proxy-manager/pull/1140 **Author:** [@chaptergy](https://github.com/chaptergy) **Created:** 5/30/2021 **Status:** ✅ Merged **Merged:** 7/11/2021 **Merged by:** [@jc21](https://github.com/jc21) **Base:** `develop` ← **Head:** `adds-logrotation` --- ### 📝 Commits (8) - [`d16bf7d`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/d16bf7d6c08aecc2c46883a9719c96b7f7615494) Adds explicit names to dev containers - [`deca493`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/deca493912dfbea07e6e2e584c64ebb16e68ec34) Splits access and error logs for each host - [`289d179`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/289d1791429db0b91f6133a531f531ac11795ec9) Adds logrotate - [`bd3a13b`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/bd3a13b2a5c047893853d12220825bf45a18e667) Also rotate other logs - [`fae848b`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/fae848bd1b0f23d9ebf14ebc8ddf651ad53002c5) Store host logs in subfolders - [`b7b150a`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/b7b150a979c4d5cd5b767987d1467f93024433dd) Run logrotation binary from program - [`56c317d`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/56c317d22347fabb55e97ef6ffde5bcd520f63d6) All logs in single folder - [`673f40b`](https://github.com/NginxProxyManager/nginx-proxy-manager/commit/673f40bd857795a7eeeb7a6997ec58ee74407d10) Removes force parameter from logrotate ### 📊 Changes **12 files changed** (+76 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `backend/setup.js` (+21 -1) 📝 `backend/templates/dead_host.conf` (+2 -1) 📝 `backend/templates/default.conf` (+2 -1) 📝 `backend/templates/letsencrypt-request.conf` (+2 -1) 📝 `backend/templates/proxy_host.conf` (+2 -2) 📝 `backend/templates/redirection_host.conf` (+2 -1) 📝 `docker/Dockerfile` (+4 -1) 📝 `docker/dev/Dockerfile` (+2 -1) 📝 `docker/docker-compose.dev.yml` (+10 -4) ➕ `docker/rootfs/etc/logrotate.d/nginx-proxy-manager` (+25 -0) 📝 `docker/rootfs/etc/nginx/conf.d/default.conf` (+2 -2) 📝 `docker/rootfs/etc/nginx/nginx.conf` (+2 -3) </details> ### 📄 Description This PR adds logrotation to the access and error logs of the hosts. both are rotated weekly. For access logs the last 4 files (=4 weeks) are kept, for error logs the last 10 files are kept. Running performing the dry-run with ``` logrotate -d /etc/logrotate.d/nginx-proxy-manager ``` seems to work as expected, however we will have to wait to see if it actually does everything as expected. Fixes https://github.com/jc21/nginx-proxy-manager/issues/183. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 08:30:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#3379
No description provided.