图2 ifcfg-eth0:2内容
2. 向/etc/hosts文件增加两条IP地址与域名的映射
[root@localhost network-scripts]# echo "192.168.0.111 www.ipvhost1.me" >>/etc/hosts [root@localhost network-scripts]# echo "192.168.0.222 www.ipvhost2.me" >>/etc/hosts 3. 创建web站点192.168.0.111和192.168.0.222的文件目录树 [root@localhost network-scripts]# mkdir -p
/var/www/vhosts/192.168.0.{111,222}/{htdocs,logs,conf,cgi-bin}
[root@localhost network-scripts]# echo
"192.168.0.111">/var/www/vhosts/192.168.0.111/htdocs/index.html [root@localhost network-scripts]# echo
"192.168.0.222">/var/www/vhosts/192.168.0.222/htdocs/index.html [root@localhost network-scripts]# tree /var/www/vhosts /var/www/vhosts |-- 192.168.0.111 | |-- cgi-bin | |-- conf | |-- htdocs
| | `-- index.html | `-- logs
`-- 192.168.0.222 |-- cgi-bin |-- conf |-- htdocs
|
`-- index.html