安装httpd服务
yum -y install httpd
查看Apache模式
查看apache模块位置
切换到默认模块目录修改
cd /etc/httpd/conf.modules.d/
vim 00-mpm.conf
第六行添加注释最后一行去掉注释
重启apache查看模块
systemctl restart httpd
httpd -V
为两个站点准备目录及主页文件
vim /etc/hosts
192.168.1.10 www.sevenwin.org
192.168.1.10 www.sevenwin.com
Ping测试
为两个域名分别写一个网页文件
修改apache的配置文件 配置两个网站的首页地址。域名 以及日志其他信息
重启生效
systemctl restart httpd
访问两个页面查看
设置网页的身份验证
配置基本身份验证文件(新生成文件)
重启生效配置文件
systemctl restart httpd
测试
访问另一个测试
不需要密码直接查看