实验:验证两份apache是否冲突
(一)实验目的:
在同一笔记本上,安装并运行两份apache,它们是否冲突。
(二)实验步骤:
1、安装第1份apache及服务
位置:D:\web\Apache24\bin\httpd.exe
服务名称:apache_24
安装服务:bin>httpd.exe -k install -n apache_24
启动服务:bin>httpd.exe -k start -n apache_24
停止服务:bin>httpd.exe -k stop -n apache_24
站点配置:D:\web\Apache24\conf\httpd.conf
站点首页:D:\web\Apache24\htdocs\index.html
2、安装第2份apache及服务
位置:D:\Web Tours 1.0\bin\httpd.exe
服务名称:apache_webtours
安装服务:bin>httpd.exe -k install -n apache_webtours
启动服务:bin>httpd.exe -k start -n apache_webtours
停止服务:bin>httpd.exe -k stop -n apache_webtours
站点配置:D:\Web Tours 1.0\conf\httpd.conf
站点首页:D:\Web Tours 1.0\htdocs\WebTours\index.htm
第2份apache的站点的首页
3、单独使用第1份apache
(1)停止第2份服务apache_webtours,启动第1份服务apache_24
(2)打开浏览器,使用http://127.0.0.1,验证第1个站点的首页是否正常
4、单独使用第2份apache
(1)停止第1份服务apache_24,启动第2份服务apache_webtours
(2)打开浏览器,使用http://127.0.0.1:1080/WebTours/ 验证第2个站点的首页是否正常
5、同时使用两份apache
(1)启动两份服务 apache_24 和 apache_webtours
(2)打开浏览器,使用http://127.0.0.1,验证第1个站点的首页是否正常
(2)打开浏览器,使用http://127.0.0.1:1080/WebTours/ 验证第2个站点的首页是否正常
(三)实验结论:
两份apache可以同时运行,不冲突。