1.要求搭建web服务器,能够访问到网页内容为“小胖,你咋这么胖呢!”
2.要求搭建web服务器,创建基于域名的虚拟主机,能够使用和访问各自的网站网站存放路径分别为/xiaopang和/dapang,内容自定。
服务端配置:
yum install httpd -y
yum install httpd -y
2 启动服务
systemctl start httpd
3 关闭防火墙
systemctl stop firewalld
4.关闭Selinux /etc/selinux/config
setenforce 0
自定义配置文件编辑多网站信息
vim /etc/httpd/conf.d/vhosts.conf
创建资源路径文件
重启服务
在 C:\Windows\System32\drivers\etc\hosts 配置
最后测试所得结果
1)
2)
2.1)
2.3)