转载网址

https://www.cnblogs.com/wu-song/p/7929595.html

  

今天为了做项目,在Apache中配置了项目域名,成功访问。但是忽然发现要访问localhost突然出现The requested URL / was not found on this server.

  Not Found  The requested URL was not found on this server.

  出现这种情况在网上查了下是由于开启 httpd.conf 文件中 Include conf/extra/httpd-vhosts.conf 导致的,只要把它注释掉就可以了,我试了一下确实可以,但是我的虚拟域名还得要啊。

  Not Found  The requested URL was not found on this server.

  于是就想给 localhost 配置虚拟域名,但是配完之后也没有出现预期的效果还是访问不了。

  Not Found  The requested URL was not found on this server.

  想了一下,localhost 在Apache配置中肯定配置了,不然装完Apache怎么就能访问我的www的根目录呢?所以就在 httpd.conf 的配置文件中找 localhost ,果然发现了 Apache 将其指向了 我的根目录,所以将其注释就可以访问了!

  Not Found  The requested URL was not found on this server.

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案