3
ubuntu@fast:~$ /etc/init.d/apache2 restart
 * Restarting web server apache2                                         [fail]
 * There are processes named 'apache2' running which do not match your 
   pid file which are left untouched in the name of safety, 
   Please review the situation by hand.

What is going on?

cat /var/run/apache2.pid 
1342

pidof apache2
1723 1468 1467 1466 1440 1439 1438 1433 1348 1347 1342 
1
  • Please edit your question to add the output of the following commands, by running it in terminal: cat /var/run/apache2.pid and pidof apache2 .
    – saji89
    Aug 8, 2013 at 7:50

3 Answers 3

1

Check if pid file path set in /etc/apache2/apache2.conf equals APACHE_PID_FILE variable exported in /etc/apache2/envvars.

1

Check pid of Apache2 by executing:

pidof apache2

Then kill the shown pid be executing:

sudo kill -9 <pid>

Restart Apache2.

1
  • 2
    not working for me. the process is still running on Ubuntu 16.04. Mar 1, 2017 at 9:20
0

I know it's too late to reply for this question but it might help someone in future.

  1. execute : pidof apache2
  2. Then, sudo kill -9 pid
  3. kill all pid by executing above command
  4. Start apache : sudo service apache2 start

Done.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .