第六章Linux服务器的配置.ppt

第六章Linux服务器的配置.ppt

2、创建目录,新建index.html mkdir /var/www/html/exam1 mkdir /var/www/html/exam2 3、设置listen监听端口 在httpd.conf中,设置listen 80 配置虚拟主机—基于IP的虚拟主机 4、在httpd.conf配置文件的第三部分中,添加对虚拟主机的定义。 VirtualHost 29 ServerName DocumentRoot /var/www/html/exam1 DirectoryIndex index.html index.php /VirtualHost VirtualHost 28 ServerName DocumentRoot /var/www/html/exam2 DirectoryIndex index.html index.php /VirtualHost 配置虚拟主机—基于IP的虚拟主机 5、用httpd –t检查虚拟主机配置是否正确。 6、重启Apache服务器,然后测试虚拟机。 配置虚拟主机—基于IP的虚拟主机 测试: 在浏览器中分别输入:

文档评论(0)

1亿VIP精品文档

相关文档