查看Apache HTTP Server
时间: 2023-10-10 17:04:33 浏览: 74
要查看 Apache HTTP Server 是否正在运行,可以使用以下命令:
```
systemctl status httpd
```
如果 Apache 正在运行,将显示如下输出:
```
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2021-09-09 10:11:41 UTC; 2 days ago
```
如果 Apache 没有运行,将显示如下输出:
```
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: inactive (dead)
```
要启动 Apache,可以使用以下命令:
```
systemctl start httpd
```
要停止 Apache,可以使用以下命令:
```
systemctl stop httpd
```
要重启 Apache,可以使用以下命令:
```
systemctl restart httpd
```
阅读全文