Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Apache won't start and there is nothing in the logs...  (Read 3533 times)

0 Members and 3 Guests are viewing this topic.

Aby

  • Guest
Apache won't start and there is nothing in the logs...
« on: January 04, 2014, 06:49:29 am »
Chance are, if apache isn't starting and isn't logging anything, the error_log is full preventing apache from starting.  To double check that, run:

Code: [Select]
cd /var/log/httpd
ls -lS | less

If any file is around 2-3 gig (or more), then chances are, that's the problem.
The solution is to remove the logs, restart apache, and then implement preventative measures.

1)
Code: [Select]
cd /var/log/httpd/
rm -f error_log
rm -f access_log
rm -f suexec_log
rm -f fpexec_log
/sbin/service httpd restart      ("/usr/local/etc/rc.d httpd restart" for FreeBSD)

2) Get logrota to rotate daily
Code: [Select]
perl -pi -e 's/weekly/daily/' /etc/logrotate.conf
perl -pi -e 's/rotate 4/rotate 2/' /etc/logrotate.conf

If apache still doesn't start, check /var/log/messages and try recompiling apache
« Last Edit: January 04, 2014, 06:51:51 am by Aby »