phpstudy无法访问localhost的原因是什么?

2026-05-07 12:381阅读0评论SEO资源
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计162个文字,预计阅读时间需要1分钟。

phpstudy无法访问localhost的原因是什么?

相关专题

1、先打开httpd.conf文件,打开httpd-vhosts.conf "Include conf/extra/httpd-vhosts.conf"的注释,启动服务时优先加载此文件.

2、在httpd-vhosts.conf文件中配置localhost的虚拟主机:

<VirtualHost *:80> DocumentRoot "F:/PHP/environment/phpstudy/WWW" ServerName localhost </VirtualHost>

3、在host文件中添加域名:

127.0.0.1 localhost

4、把httpd.conf中的"#ServerName localhost:80"或者把"ServerName localhost"注释掉即可,localhost可以正常访问了!

立即学习“PHP免费学习笔记(深入)”;

 推荐教程:phpstudy使用教程

本文共计162个文字,预计阅读时间需要1分钟。

phpstudy无法访问localhost的原因是什么?

相关专题

1、先打开httpd.conf文件,打开httpd-vhosts.conf "Include conf/extra/httpd-vhosts.conf"的注释,启动服务时优先加载此文件.

2、在httpd-vhosts.conf文件中配置localhost的虚拟主机:

<VirtualHost *:80> DocumentRoot "F:/PHP/environment/phpstudy/WWW" ServerName localhost </VirtualHost>

3、在host文件中添加域名:

127.0.0.1 localhost

4、把httpd.conf中的"#ServerName localhost:80"或者把"ServerName localhost"注释掉即可,localhost可以正常访问了!

立即学习“PHP免费学习笔记(深入)”;

 推荐教程:phpstudy使用教程