1. Restart apache daily. Put in /etc/cron.daily directory.
#!/bin/bash
#/usr/bin/systemctl restart httpd
#/usr/bin/systemctl start httpd
for (( ; ; ))
do
echo "checking"
sleep 120
if [ `ps auxwwww|grep httpd|grep -v grep|wc -l` -gt 0 ]
then
echo Apache is running.
break
else
echo Apache is not running.
/usr/bin/systemctl start httpd
fi
done
2. Set Limit File Size Per User Using Limits.conf
#example : limit file size ~100MB per file per user
#create file in /etc/security/limits.d/99-hafez.conf
#enter details below:
--------------- BOF ------------------
# hard fsize
hafez hard fsize 100000
--------------- EOF -----------------
#save the file
#-- tested on centos 6.9
Advertisements