Ubuntu: Apache can't start on Ubuntu



Question:

I have the following error that's appearing in my log errors in the file /var/log/apport.log

ERROR: apport (pid 27860) Fri Aug 7 20:03:43 2015: called for pid 27856, signal 11 ERROR: apport (pid 27860) Fri Aug 7 20:03:43 2015: executable: /root/.scan/update (command line "./update 1500") ERROR: apport (pid 27860) Fri Aug 7 20:03:43 2015: executable does not belong to a package, ignoring

Everytime I type in my SSH Command :

sudo service apache2 start

The following error appear:

* Starting web server apache2 (20)Not a directory: apache2: could not open error log file /var/log/apache2/error.log. Unable to open logs Action 'start' failed. The Apache error log may have more information.

and when I try to go to check the error log there's no directory called apache2 nor a file called error.log,

current version are the following

Ubuntu is 12.04 LTS

Apache 2.2.22

PHP 5.3

Thank you


Solution:1

Try to do this:

  • mkdir /var/log/apache2
  • touch /var/log/apache2/error.log
  • touch /var/log/apache2/access.log
  • chown -R root:adm /var/log/apache2
  • chmod 750 /var/log/apache2
  • chmod -R 540 /var/log/apache2/*
  • service apache2 restart

But thats not a normal behaviour of apache2. May be you should check your server with the programm: chkrootkit - perhaps it was hacked or someone deleted the apache2 log dir.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »