27

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?

Li'
  • 3,133
  • 10
  • 34
  • 51

2 Answers2

76

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

Apache2 is running (pid xxxx)

MarthyM
  • 1,839
  • 2
  • 21
  • 23
ebolton
  • 1,126
  • 3
  • 14
  • 20
4

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

Robert Bolton
  • 667
  • 3
  • 8
  • 22