The requested URL / was not found on this server——Apache配置虚拟域名后无法访问localhost
今天为了做项目,在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的更多相关文章
- 404 Not Found The requested URL * was not found on this server
1. 把从SVNcheckout下来的代码搭建起来.CakePHP+mysql.改动数据库配置. 2. 配置虚拟主机,发现訪问不了/user/login这个URL,报这个错误:404 Not Foun ...
- Not Found The requested URL / was not found on this server.
http://www.wanysys.cc/coding/php/800.html 今天在做本地PHP项目的时候,想把之前wampserver的本地虚拟服务器环境访问方式改为本地localhost访问 ...
- The requested URL / was not found on this server
The requested URL / was not found on this server.原因:未打开Apache的重写功能#LoadModule rewrite_module modules ...
- Yii2.0 解决“the requested URL was not found on this server”问题
在你下了 Yii 框架,配置完路由 urlManager 后,路由访问页面会报错“the requested URL was not found on this server”,url类似于这种“ht ...
- 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 ...
- 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 ...
- wampserver 的Apache启动错误提示:The requested URL / was not found on this server.
打开localhost显示以下错误 原因:之前我配置了虚拟主机,所以服务器是从虚拟环境访问的,localhost也就访问不到 解决方法:打开httpd.conf配置文件,将Include conf/e ...
- 尚未配置为Web项目.指定的本地IIS URL http://localhsst/..要打开项目,需要配置虚拟目录 。是否立即创建虚拟目录 解决
1.编辑.csproj文件 2.修改 UseIIS节点改为false,再次打开程序即可
- git clone出现的error: The requested URL returned error: 401 Unauthorized
error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.. ...
随机推荐
- C++中的endl
从开始接触C++到现在,一直以为语句 cout << "hello world!" << endl; 中的endl只是一个相当于C中的换行'\n':直到今天 ...
- 利用python基于微博数据打造一颗“心”
一年一度的虐狗节将至,朋友圈各种晒,晒自拍,晒娃,晒美食,秀恩爱的.程序员在晒什么,程序员在加班.但是礼物还是少不了的,送什么好?作为程序员,我准备了一份特别的礼物,用以往发的微博数据打造一颗&quo ...
- Golang源码探索(一) 编译和调试源码
GO可以说是近几年最热门的新型语言之一了, 一般人看到分布式和大数据就会想到GO, 这个系列的文章会通过研究golang的源代码来分析内部的实现原理, 和CoreCLR不同的是, golang的源代码 ...
- Apache和Tomcat整合(一个Apache 不同域名处理多个不同业务)
一.简介 在项目中,几乎任何一个项目都包括静态资源和动态请求两大部分.特别对于门户网站这样的项目,静态内容资源会更多,我们使用一般的 Tomcat 部署时,Tomcat 对静态资源的处理能力比较慢,至 ...
- Android 开发笔记___Intent的使用
public class ActRequestActivity extends AppCompatActivity implements OnClickListener { private EditT ...
- 【Kafka源码】ReplicaManager启动过程
在KafkaServer启动过程的入口中,会启动Replica Manager,众所周知,这是一个副本管理器.replica在Kafka中扮演的角色很重要,是保证消息不丢失的一个重要概念. repli ...
- 关于thinkphp控制器引用model里的方法的一点收获
有时候真的是很绕,为了这一点点收获,我几乎花了一天的时间.当我弄明白了的那一刻,我.........好吧,写到这里,我发现不能换行.好吧,就这样吧,开始说正题:要想在controler从model引用 ...
- hibernate flushMode 错误
1 十一月 15, 2017 10:13:36 上午 org.apache.struts2.dispatcher.Dispatcher error 2 严重: Exception occurred d ...
- C# 中操作API
作为初学者来说,在C#中使用API确是一件令人头疼的问题.在使用API之间你必须知道如何在C#中使用结构.类型转换.安全/不安全代码,可控/不可控代码等许多知识. 一切从简单开始,复杂的大家一时不能接 ...
- 多线程+socket实现多人聊天室
最近在学习多线程的时候打算做一个简单的多线程socke聊天的程序,结果发现网上的代码都没有完整的实现功能,所以自己实现了一个demo: demo功能大致就是,有一个服务端负责信息转发,多个客户端发送消 ...