今天为了做项目,在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. angualr高级篇之elem.scope()、elem.isolateScope和$compile(elem)(scope)中scope的区别

    在angular的使用过程中我们经常用$rootScope.$new()为elem创建一个新的作用域scope,然后使用$compile(elem)(scope)编译这个含有指令的元素.那么这里传进去 ...

  2. 【机器学习实战】第12章 使用FP-growth算法来高效发现频繁项集

    第12章 使用FP-growth算法来高效发现频繁项集 前言 在 第11章 时我们已经介绍了用 Apriori 算法发现 频繁项集 与 关联规则.本章将继续关注发现 频繁项集 这一任务,并使用 FP- ...

  3. windows 系统下C++实现的多线程

    摘抄http://blog.csdn.net/huyiyang2010/article/details/5809919 Thread.h #ifndef __THREAD_H__ #define __ ...

  4. Catch him

    Problem Description 在美式足球中,四分卫负责指挥整只球队的进攻战术和跑位,以及给接球员传球的任务.四分卫是一只球队进攻组最重要的球员,而且一般身体都相对比较弱小,所以通常球队会安排 ...

  5. Android 开发笔记___Application操作全局变量

    只要app在运行中,他就是一个application.因此可以用它来保存一些全局变量 package com.example.alimjan.hello_world; import android.a ...

  6. 实现 node_modules 共享

    参考:https://segmentfault.com/a/1190000000610038 Gruntjs 作为前端工程化工具,能够很好的对前端资源进行管理(校验,合并,压缩). 久之,发现一个问题 ...

  7. 一些神奇的JS功效

    1: 沉睡排序 var numbers=[1,2,3,4,5,5,99,4,20,11,200]; numbers.forEach((num)=>{ setTimeout(()=>{ co ...

  8. 微信小程序语音识别服务搭建全过程解析(https api开放,支持新接口mp3录音、老接口silk录音)

    silk v3(或新录音接口mp3)录音转olami语音识别和语义处理的api服务(ubuntu16.04服务器上实现) 重要的写在前面 重要事项一: 所有相关更新,我优先更新到我个人博客中,其它地方 ...

  9. 一起写框架-Ioc内核容器的实现-基础功能-ComponentScan支持组件注解限制(七)

    实现功能 以上的代码我们发现.我们都是将@ComponentScan扫描的路径下的所有类都加载到容器中的. 而实际需求,我们并不希望所有的类都创建对象,而是加了组件注解@Controller,@Ser ...

  10. linux C/C++开发环境搭建指南

    一.安装基本开发环境 1.配置GCC 刚装好的系统中已经有GCC了,但是这个GCC什么文件都不能编译,因为没有一些必须的头文件,所以要安装build-essential这个软件包,安装了这个包会自动安 ...