Httpd服务器是Apache产品线下的一款Web服务器。
## httpd服务
查询httpd
```
yum info httpd
```
安装和配置httpd服务
```
yum install httpd -y
systemctl start httpd
systemctl enable httpd
systemctl status httpd
```
查询socket statistics状态
```
ss -antp | grep httpd
```
配置防火墙例外
```
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
firewall-cmd --list-services
```
配置文件/etc/httpd/conf/httpd.conf
## 单主机托管多站点
修改配置文件vi /etc/httpd/conf/httpd.conf(添加下面内容)
```
<VirtualHost *:80>
DocumentRoot "/var/www/www1.aphabook.cn"
ServerName www1.aphabook.cn
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/var/www/www2.aphabook.cn"
ServerName www2.aphabook.cn
</VirtualHost>
```