一.要求搭建web服务器,能够访问到网页内容为“小胖,你咋这么胖呢!”
第一步挂载:# mount /dev/sr0 /mnt
第二步配置yum源:# vim /ect/yum.repos.d/base.repo
第三步装包:# systemctl start httpd
#systemctl stop firewalld
#setenforce 0
#systemctl start httpd
#ll /var/www/html
#echo “小胖,你咋这么胖呢!” > /var/www/html/index.html
#systemctl restart httpd
二.要求搭建web服务器,创建基于域名的虚拟机,能使用www.xiaopang.com和www.dapang.com访问各自的网站存放路径分别为/xiaopang和/dapang,内容自定。
<VirtualHost 192.168.163.201::80>
Servername 192.168.163.201
DocumentRoot /www/xiaopang
</VirtualHost>
<Directory /www/>
AllowOverride none
Require all granted
</Directory>
<VirtualHost 192.168.163.201
Servername www.xiaopang.com
DocumentRoot /www/xiaopang
</VirtualHost>
<VirtualHost 192.168.163.201>
Servername www.dapang.com
DocumentRoot /www/dapang
</VirtualHost>