第一步 加网络适配器 nmcli connection modify ens192 +ipv4.address 192.168.119.100/24 ipv4.gateway 192.168.119.1 ipv4.method manual nmcli connecttion modify ens192 +ipv4.address 192.168.119.200/24 ipv4.gateway 192.168.119.1 ipv4.method manual nmcli connection up ens 192 第二**步 mkdir -pv /www/ip/{100,200} echo gay > /www/ip/100/index.html echo diao > /www/ip/200/index.htm setenforce 0 getenforce
vim /etc/httpd/conf.d/host.conf 修改配置文件
<directory /www> allowoverride none require all granted <virtualhost 192.168.119.100:80> documentroot /www/name servername www.zuoye.com/22222 <virtualhost 192.168.119.200:80> documentroot /www/ip/200 servername 192.168.119.200 第三步 启动 测试 systemctl restart httpd curl 192.168.119.100 curl 192.168.119.200
|