G J Piper
Regular Pleskian
TITLE:
Nginx SSL access logs not rotated according to GUI settings -- fail2ban suffers
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:Plesk Onyx 17.5.3 mu#20
CentOS 6.9 (final)
Nginx as a reverse-proxy
PROBLEM DESCRIPTION:CentOS 6.9 (final)
Nginx as a reverse-proxy
The log-rotation settings file for each domain, as set in the GUI, is found here:
/usr/local/psa/etc/logrotate.d/domain.ext
It contains this group of settings, which are configurable in the GUI, mostly:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
/var/www/vhosts/system/domain.ext/logs/*.processed {
size=5120000
rotate 10
compress
missingok
}
/var/www/vhosts/system/domain.ext/logs/error_log {
size=5120000
rotate 10
compress
missingok
copytruncate
}
/var/www/vhosts/system/domain.ext/logs/proxy_error_log {
size=5120000
rotate 10
compress
missingok
copytruncate
}
However, all the domains also write to this other log file, which can grow unchecked:
/var/www/vhosts/system/domain.ext/logs/proxy_access_ssl_log
We need this fixed. This is causing huge nginx SSL access log files that eventually crash fail2ban.
Shouldn't these domain-specific settings files also contain this?:
/var/www/vhosts/system/domain.ext/logs/proxy_access_ssl_log {
size=5120000
rotate 10
compress
missingok
copytruncate
}
See screenshot of logs:
STEPS TO REPRODUCE:/usr/local/psa/etc/logrotate.d/domain.ext
It contains this group of settings, which are configurable in the GUI, mostly:
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
/var/www/vhosts/system/domain.ext/logs/*.processed {
size=5120000
rotate 10
compress
missingok
}
/var/www/vhosts/system/domain.ext/logs/error_log {
size=5120000
rotate 10
compress
missingok
copytruncate
}
/var/www/vhosts/system/domain.ext/logs/proxy_error_log {
size=5120000
rotate 10
compress
missingok
copytruncate
}
However, all the domains also write to this other log file, which can grow unchecked:
/var/www/vhosts/system/domain.ext/logs/proxy_access_ssl_log
We need this fixed. This is causing huge nginx SSL access log files that eventually crash fail2ban.
Shouldn't these domain-specific settings files also contain this?:
/var/www/vhosts/system/domain.ext/logs/proxy_access_ssl_log {
size=5120000
rotate 10
compress
missingok
copytruncate
}
See screenshot of logs:
Observe the subscription nginx SSL access log file over a 24-hour period to see it grows way beyond the log settings set in the GUI for the domain subscription.
ACTUAL RESULT:Log file is allowed to grow unchecked except for log-rotation every 24-hours or so.
EXPECTED RESULT:Log file should be rotated along with all the other log files according to subscription log settings.
ANY ADDITIONAL INFORMATION:
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:Confirm bug