apache配置虚拟主机后,启动速度慢
apache配置虚拟主机后,启动速度慢且提示“the requested operation has failed”
可以通过在cmd下启动,来查找问题(命令中的“apache2.2”,是服务名,根据自己的来填写)
我在本地配置了10多个网站,每次启动apache,速度都在5分钟左右,原来是都没有配置servername的原因
<VirtualHost 127.0.0.1> DocumentRoot D:/Apache2.2/htdocs/phpMyAdmin </VirtualHost> <VirtualHost 127.0.0.2> DocumentRoot D:/Apache2.2/htdocs/email </VirtualHost> <VirtualHost 127.0.0.3> DocumentRoot D:/Apache2.2/htdocs/help </VirtualHost>
因是本地测试,随便配置一些域名即可:
<VirtualHost 127.0.0.1> DocumentRoot D:/Apache2.2/htdocs/phpMyAdmin Servername www.1.com </VirtualHost> <VirtualHost 127.0.0.2> DocumentRoot D:/Apache2.2/htdocs/email Servername www.2.com </VirtualHost