1.进入10文件夹,创建目录
2.创建主页
echo "WWW.ip10.com 10/www/index.html" >/home/wwwroot/10/www/index.htmlecho "BBS.ip10.com" >/home/wwwroot/10/bbs/index.htmlecho "TECH.ip10.com" >/home/wwwroot/10/tech/index.html
3.修改配置文件,并重启
vim /etc/httpd/conf/httpd.confsystemctl restart httpd
<VirtualHost 192.168.91.10> DocumentRoot /home/wwwroot/10/www ServerName www.ip10.com <Directory /home/wwwroot/10/www> AllowOverride None Require all granted </Directory></VirtualHost><VirtualHost 192.168.91.10> DocumentRoot /home/wwwroot/10/bbs ServerName bbs.ip10.com <Directory /home/wwwroot/10/bbs> AllowOverride None Require all granted </Directory></VirtualHost><VirtualHost 192.168.91.10> DocumentRoot /home/wwwroot/10/tech ServerName tech.ip10.com <Directory /home/wwwroot/10/tech> AllowOverride None Require all granted </Directory></VirtualHost>
4.修改hosts文件




