I had an issue with a setup of nginx-proxy-manager. I have it set up for a relative of mine as a docker container in an Ubuntu virtual machine, and suddently it began glitching. The latest symptoms was that port 80 was accessible from the other machines in the network, but port 81 was not.
Apparently, the culprit was the logs which grew to over 2GB in just a few months.
By looking at /data/logs in the container file system, I noticed that the logs are never rotated and just grow indefinitely, and I think it's bound to hit pretty much every user at some point.
Thus I would like to suggest to either configure log rotation out of the box, or to explain how this should be done externally (since I just noticed that /data volume is a directory exposed from the host machine).
Or perhaps another option would be to allow easy disabling of nginx logging into files altogether, and instead let it log to stdout?
You can use default logrotated:
/path/to/nginx/*.log {
maxsize 500M
daily
missingok
rotate 14
compress
notifempty
create 0640 root root
sharedscripts
postrotate
docker exec CONTAINER_NAME bash -c 'kill -USR1 `cat /var/run/nginx.pid`'
endscript
}
Ran into this issue today myself when my server was suddenly out of disk space (my bad for not setting up alerts for it), upon investigation I noticed that the proxy-manager log folder contained several 25+ GB logs.
Most helpful comment
You can use default logrotated: