1 安裝
yum install -y httpd
2 配置網卡
ifconfig ens33? ? ?192.168.43.182
ifconfig ens33:2? 192.168.43.192
ifconfig ens33:3? 192.168.43.202
網絡設置
3 配置網頁
mkdir -p /home/www
cd /home/www
mkdir html{1,2,3}
echo "192.168.43.182" >html1/index.html
echo "192.168.43.192" >html2/index.html
echo "192.168.43.202" >html3/index.html
網頁配置
4 主配置文件
vim /etc/httpd/conf/httpd.conf
vim /etc/httpd/conf/httpd.conf
5 啟動與測試
systemctl start httpd
測試1
192.168.43.182
測試2
192.168.43.192
測試3
192.168.43.202