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

  

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

  

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

  

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

  

The requested URL / was not found on this server——Apache配置虚拟域名后无法访问localhost的更多相关文章

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

    1. 把从SVNcheckout下来的代码搭建起来.CakePHP+mysql.改动数据库配置. 2. 配置虚拟主机,发现訪问不了/user/login这个URL,报这个错误:404 Not Foun ...

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

    http://www.wanysys.cc/coding/php/800.html 今天在做本地PHP项目的时候,想把之前wampserver的本地虚拟服务器环境访问方式改为本地localhost访问 ...

  3. The requested URL / was not found on this server

    The requested URL / was not found on this server.原因:未打开Apache的重写功能#LoadModule rewrite_module modules ...

  4. Yii2.0 解决“the requested URL was not found on this server”问题

    在你下了 Yii 框架,配置完路由 urlManager 后,路由访问页面会报错“the requested URL was not found on this server”,url类似于这种“ht ...

  5. php ci 报错 Object not found! The requested URL was not found on this server. If you entered the URL manually please check

    Object not found! The requested URL was not found on this server. The link on the referring page see ...

  6. Object not found! The requested URL was not found on this server.... 报错解决方案

    服务器(centos6.5) lnmp 报错如下 Object not found! The requested URL was not found on this server. The link ...

  7. wampserver 的Apache启动错误提示:The requested URL / was not found on this server.

    打开localhost显示以下错误 原因:之前我配置了虚拟主机,所以服务器是从虚拟环境访问的,localhost也就访问不到 解决方法:打开httpd.conf配置文件,将Include conf/e ...

  8. 尚未配置为Web项目.指定的本地IIS URL http://localhsst/..要打开项目,需要配置虚拟目录 。是否立即创建虚拟目录 解决

    1.编辑.csproj文件 2.修改 UseIIS节点改为false,再次打开程序即可

  9. git clone出现的error: The requested URL returned error: 401 Unauthorized

    error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.. ...

随机推荐

  1. nvm进行node多版本管理

    写在前面 nvm(nodejs version manager)是nodejs的管理工具,如果你需要快速更新node版本,并且不覆盖之前的版本:或者想要在不同的node版本之间进行切换: 使用nvm来 ...

  2. vs2013配置opencv环境

    首先本人的opencv版本是opencv2.4.9. 步骤如下: 1. 首先下载opencv2.4.9 2. 配置环境变量: 3. 系统变量:D:\opencv\build\x86\vc12\bin ...

  3. Android打开/data/目录以及导出文件

    打开logcat和和file Explorer Tools-->Android-->Android Device Monitor 如果右侧没有出现,Windows-->Show Vi ...

  4. JS 引用类型

    object类型: js中大多数引用类型都是Object类型的实例.创建object实例有两种方法:第一种是使用new操作符后跟Object构造函数. var obj = new Object();o ...

  5. 深入理解java虚拟机_第二章_读书笔记

    1.本章内容目录: 概述 运行时数据区域 程序计数器 java虚拟机栈 本地方法栈 java堆 方法区 运行时常量池 直接内存 HotSpot虚拟机对象探秘 对象的创建 对象的内存布局 对象的访问定位 ...

  6. Rsync服务

    第1章 Rsync开篇介绍 1.1 rsync的定义 Rsync是一款开源的.快速的.多功能的.可实现全量及增量的本地或远程数据同步备份的优秀工具.Rsync软件适用于unix/linux/windo ...

  7. python基础阶段练习题 拾英札记(1)

    python很灵活,学起来有人机交互的快乐感,贵在坚持. 做题对自学python很有帮助,融汇贯通-查漏补缺-巩固提高. 写了一些注释,希望能对您有所帮助. #1.输入一个3位数,计算个位.百位.十位 ...

  8. [转载] Java并发编程:Lock

    转载自http://www.cnblogs.com/dolphin0520/p/3923167.html 以下是本文目录大纲: 一.synchronized的缺陷 二.java.util.concur ...

  9. select * from 的一些心得

    如何简单运用好 select * from语句,在不同的函数下,有不同的先后顺序. 语法格式 (代表先后顺便) (2)select 字段名 查询什么东西 (1)from 表名,从哪个表查询 例如:查询 ...

  10. 分布式网络文件系统--MooseFS

    一.介绍 1.简介 MooseFS是一个具备冗余容错功能的分布式网络文件系统,它将数据分别存放在多个物理服务器或单独磁盘或分区上,确保一份数据有多个备份副本.对于访问的客户端或者用户来说,整个分布式网 ...