本文摘自PHP中文网,作者angryTom,侵删。
1、先打开httpd.conf文件,打开httpd-vhosts.conf "Include conf/extra/httpd-vhosts.conf"的注释,启动服务时优先加载此文件.
2、在httpd-vhosts.conf文件中配置localhost的虚拟主机:
1 2 3 4 |
|
3、在host文件中添加域名:
1 |
|
4、把httpd.conf中的"#ServerName localhost:80"或者把"ServerName localhost"注释掉即可,localhost可以正常访问了!
推荐教程:phpstudy使用教程
以上就是phpstudy打不开localhost的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
phpStudy apache和mysql启动后又停止的有效解决办法
更多相关阅读请进入《phpStudy》频道 >>