Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check is Apache2 is stopped in Ubuntu? [closed]

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?

like image 891
Li' Avatar asked Sep 05 '25 11:09

Li'


2 Answers

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

Apache2 is running (pid xxxx)

like image 82
Cubatown Avatar answered Sep 08 '25 10:09

Cubatown


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

like image 32
Robert Bolton Avatar answered Sep 08 '25 08:09

Robert Bolton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!