Ubuntu“无法重新启动 apache2.service:未找到单元 apache2.service。”

Dav*_*ola 2 apache mod-security google-cloud-platform ubuntu-18.04

我正在使用 Google Cloud Platform 来测试 ModSecurity,我正在使用教程来启动它。但是,我需要每隔一段时间重新启动 Apache。我正在使用 Ubuntu 18.04。我写了sudo systemctl restart apache2,但错误又回来了,上面写着Failed to restart apache2.service: Unit apache2.service not found。我该怎么办?

tot*_*tok 7

您是否先安装了 apache2?

sudo apt install apache2
Run Code Online (Sandbox Code Playgroud)