I am using Google Cloud Platform to test out ModSecurity and I am using a tutorial to launch it. However, I need to restart Apache every once in a while. I'm using Ubuntu 18.04. I write sudo systemctl restart apache2
, but an error comes back and it says Failed to restart apache2.service: Unit apache2.service not found
. What should I do?
Asked
Active
Viewed 5.1k times
5

David Babablola
- 313
- 2
- 3
- 11
2 Answers
4
For those who run into the same issue using Debian
I did have apache2 installed and running as was confirmed by apache2.service | loaded active running
.
I still tried to install it.
I did also get the same error Failed to restart apache2.service: Unit apache2.service not found
How I got apache2 to restart
Using: Debian (9.13)
sudo service apache2 restart
or by typing
sudo apachectl stop
sudo apachectl start

Christian Aichner
- 366
- 3
- 18
-
3Looks like you simply misspelled `apache` as `apatche2` when you tried to restart using `service`. – Paul Ratazzi Mar 02 '21 at 17:27