10-提供apache httpd web服务-配置虚拟主机

1.服务器:安装软件包。

10-提供apache httpd web服务-配置虚拟主机

2.服务器:创建默认网页文件。

10-提供apache httpd web服务-配置虚拟主机

3.服务器:创建默认状态下的80端口访问显示网页配置文件(即没有启用虚拟主机的状态,默认的IP地址或IP解析地址),指定访问本地文件目录为/srv/default/www,对文件directory的访问授权为require all granted。

10-提供apache httpd web服务-配置虚拟主机

4.服务器:启动虚拟主机状态下,通过80端口访问时,全称www0.example.com,简称www0,访问将被执行/srv/www0.example.com/www目录,同时对目录directory的访问授权为require all granted。

10-提供apache httpd web服务-配置虚拟主机

5.服务器:启动httpd服务,载入启动项,查看服务确认httpd服务处于启动状态。配置防火墙放行http,重新载入防火墙生效,查看防火墙配置。

10-提供apache httpd web服务-配置虚拟主机

10-提供apache httpd web服务-配置虚拟主机

7.客户端:通过firefox,访问站点。

10-提供apache httpd web服务-配置虚拟主机

10-提供apache httpd web服务-配置虚拟主机

10-提供apache httpd web服务-配置虚拟主机

10-提供apache httpd web服务-配置虚拟主机