logrotate.conf update and some cleanup
This commit is contained in:
parent
34a0da444f
commit
e1356e3eb0
@ -571,36 +571,23 @@ rsyslogd
|
|||||||
# start crond
|
# start crond
|
||||||
crond
|
crond
|
||||||
|
|
||||||
# start nginx
|
# create empty logs
|
||||||
if [ ! -f "/var/log/access.log" ] ; then
|
touch /var/log/access.log
|
||||||
touch /var/log/access.log
|
touch /var/log/error.log
|
||||||
fi
|
|
||||||
if [ ! -f "/var/log/error.log" ] ; then
|
|
||||||
touch /var/log/error.log
|
|
||||||
fi
|
|
||||||
|
|
||||||
# modsec logs
|
# fix nginx configs rights (and modules through the symlink)
|
||||||
touch /var/log/modsec_audit.log
|
|
||||||
chown root:nginx /var/log/modsec_audit.log
|
|
||||||
chmod 760 /var/log/modsec_audit.log
|
|
||||||
|
|
||||||
# nginx default error log
|
|
||||||
touch /var/log/nginx/error.log
|
|
||||||
chown root:nginx /var/log/nginx/error.log
|
|
||||||
chmod 760 /var/log/nginx/error.log
|
|
||||||
|
|
||||||
# nginx configs (and modules through the symlink)
|
|
||||||
chown -R root:nginx /etc/nginx/
|
chown -R root:nginx /etc/nginx/
|
||||||
chmod -R 740 /etc/nginx/
|
chmod -R 740 /etc/nginx/
|
||||||
find /etc/nginx -type d -exec chmod 750 {} \;
|
find /etc/nginx -type d -exec chmod 750 {} \;
|
||||||
|
|
||||||
# let's encrypt
|
# fix let's encrypt rights
|
||||||
if [ "$AUTO_LETS_ENCRYPT" = "yes" ] ; then
|
if [ "$AUTO_LETS_ENCRYPT" = "yes" ] ; then
|
||||||
chown -R root:nginx /etc/letsencrypt
|
chown -R root:nginx /etc/letsencrypt
|
||||||
chmod -R 740 /etc/letsencrypt
|
chmod -R 740 /etc/letsencrypt
|
||||||
find /etc/letsencrypt -type d -exec chmod 750 {} \;
|
find /etc/letsencrypt -type d -exec chmod 750 {} \;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# start nginx
|
||||||
echo "[*] Running nginx ..."
|
echo "[*] Running nginx ..."
|
||||||
su -s "/usr/sbin/nginx" nginx
|
su -s "/usr/sbin/nginx" nginx
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
/var/log/messages /var/log/*.log /var/log/clamav/*.log /var/log/php7/*.log {
|
/var/log/*.log /var/log/clamav/*.log /var/log/nginx/*.log {
|
||||||
# compress old files using gzip
|
# compress old files using gzip
|
||||||
compress
|
compress
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,3 @@ module(load="imuxsock")
|
|||||||
$template rawFormat,"%msg:2:2048%\n"
|
$template rawFormat,"%msg:2:2048%\n"
|
||||||
local0.=notice /var/log/access.log;rawFormat
|
local0.=notice /var/log/access.log;rawFormat
|
||||||
local0.*;local0.!=notice /var/log/error.log;rawFormat
|
local0.*;local0.!=notice /var/log/error.log;rawFormat
|
||||||
|
|
||||||
# PHP
|
|
||||||
local1.* /var/log/php.log
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user