今天为了做项目,在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. CentOS7安装GitLab、汉化及使用

    同步首发:http://www.yuanrengu.com/index.php/20171112.html 一.GitLab简介 GitLab是利用Ruby On Rails开发的一个开源版本管理系统 ...

  2. Ellipse

    Description There is an beautiful ellipse whose curve equation is: b > 0)" src="http:// ...

  3. 记Javascript的编写方式的全新学习

    前言 这次有幸参与前端的工作,对于前端开发学习了不少新知识,在此记录一下相比之前,完全不同的Javascript编写方式. 原来的编写方式 之前也是写过Javascript,就是常见的.js 文件写函 ...

  4. [译]移动API安全终极指南

    文章主要讲了移动api调用的授权和验证问题,原文链接:The Ultimate Guide to Mobile API Security 移动API的使用是Stack Overflow和 Stormp ...

  5. 消息中间件ActiveMQ及Spring整合JMS的介绍

    一 .消息中间件的基本介绍 1.1 消息中间件 1.1.1 什么是消息中间件 消息中间件利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信来进行分布式系统的集成.通过提供消息传递和消息排 ...

  6. 动态代理:JDK动态代理和CGLIB代理的区别

    代理模式:代理类和被代理类实现共同的接口(或继承),代理类中存有指向被代理类的索引,实际执行时通过调用代理类的方法.实际执行的是被代理类的方法. 而AOP,是通过动态代理实现的. 一.简单来说: JD ...

  7. 微软Connect(); 2017大会梳理:Azure、数据、AI开发工具

    在今天召开的 Connect(); 2017 开发者大会上,微软宣布了 Azure.数据.AI 开发工具的内容.这是第一天的 Connect(); 2017 的主题演讲. 在开场视频中霍金又来了.你记 ...

  8. mysql全日志(general log)的命令名称

    在源码sql/sql_parse.cc中定义 const LEX_STRING command_name[]={ { C_STRING_WITH_LEN("Sleep") }, { ...

  9. 【机器学习】人工神经网络ANN

    神经网络是从生物领域自然的鬼斧神工中学习智慧的一种应用.人工神经网络(ANN)的发展经历的了几次高潮低谷,如今,随着数据爆发.硬件计算能力暴增.深度学习算法的优化,我们迎来了又一次的ANN雄起时代,以 ...

  10. Drools文档(八) 规则语言参考

    规则语言参考 概述 Drools有一个"本地"的规则语言.这种格式在标点符号上非常轻,并且通过"扩展器"支持自然语言和领域特定的语言,使语言能够变形到您的问题领 ...