How to check is Apache2 is stopped in Ubuntu?

25

I want to make sure apache2 service is stopped.

1. I need to verify if apache2 is installed or not.

when I type:

sudo /etc/init.d/apache2 stop

I got:

sudo: /etc/init.d/apache2: command not found

Does this mean apache2 is not installed? Or is it installed in another place?

2. check apache2 process:

when I type:

ps a | grep apache2

I got:

10448 pts/4    S+     0:00 grep --color=auto apache2

Does it mean apache2 is running?

3. http://localhost test

I got:

Google Chrome could not connect to localhost

How can I verify that Apache2 is stopped?

This question is tagged with ubuntu process apache2

~ Asked on 2013-04-22 20:25:20

The Best Answer is


70

In the command line type service apache2 status then hit enter. The result should say:

Apache2 is running (pid xxxx)

~ Answered on 2013-04-22 20:27:54


4

You can also type "top" and look at the list of running processes.

~ Answered on 2013-04-22 20:31:47


Most Viewed Questions: