报错信息1:

Starting httpd: [Fri May 19 11:49:42 2011] [warn] VirtualHost 127.0.0.1:80 overl
aps with VirtualHost 127.0.0.1:80, the first has precedence, perhaps you need a
NameVirtualHost directive

这个说明虚拟主机的NAME没开,NameVirtualHost 就是他没开,如下就可以了

#加上这里就好了~~,之后就可加任意多的virtual host了

NameVirtualHost 192.168.8.37:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#     ServerAdmin webmaster@dummy-host.example.com
#     DocumentRoot /www/docs/dummy-host.example.com
#     ServerName dummy-host.example.com
#     ErrorLog logs/dummy-host.example.com-error_log
#     CustomLog logs/dummy-host.example.com-access_log common
#/VirtualHost>

<VirtualHost *:80>
     ServerAdmin webmaster@dummy-host.example.com
     DocumentRoot /var/www/html
     ServerName dummy-host.example.com
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

<VirtualHost 192.168.8.37:80>
     ServerAdmin webmaster@dummy-host.example.com
     DocumentRoot /var/www/html
     ServerName XXX.com
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

the first has precedence, perhaps you need a NameVirtualHost directive的更多相关文章

  1. httpd 虚拟主机建立之访问机制及其日志定义

    注:关闭防火墙,selinux VirtualHost定义: 基于IP地址VirtualHost: 编辑httpd.conf文件: #DocumentRoot "/web/html" ...

  2. 如何进行Apache虚拟机设置

    摘要:虚拟机Apache设置很多用户都遇到过,具体如何进行虚拟机Apache设置?怎样才能让虚拟机Apache设置达到最简单,最优化?本文为您讲解. Apache虚拟机设置有两种方法: 基于主机名的虚 ...

  3. 微软BI 之SSIS 系列 - Precedence Constraint 详解优先约束的使用

    开篇介绍 Precedence Constraint 优先约束 - 在控制流中使用,用来链接控制流中各种 Task,Container,并且要求满足一定的条件才能执行相关联的 Task 或者 Cont ...

  4. 解决[warn] _default_ VirtualHost overlap on port 80, the first has precedence问题

    问题背景: 在apache的httpd.conf里新增加了1个VirtualHost,域名是xxx.com,此时,服务器总共2个VirtualHost ,service httpd restart的时 ...

  5. C++ - Operator Precedence

    The following table lists the precedence and associativity of C++ operators. Operators are listed to ...

  6. Operator '?:' has lower precedence than '*'; '*' will be evaluated first

    1.项目中用宏的时候,遇到如下警告 Operator '?:' has lower precedence than '*'; '*' will be evaluated first 2.错误原因 *操 ...

  7. 解决:配置虚拟主机,重启apache,[warn] _default_ VirtualHost overlap on port 80, the first has precedence

    http://blog.csdn.net/kaizhu_qin/article/details/17506293 很多第一次配置apache的虚拟主机的时候,以为配置第一个虚拟主机完成以后,以后就不会 ...

  8. django1.8 提示(1_8.W001) The standalone TEMPLATE_* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your defau

    原因是升级之后不推荐使用单独的 TEMPLATES_DIR这样的设置了,使用TEMPLATE = []这种就好了 详细见https://openedx.atlassian.net/browse/TNL ...

  9. [每日一题] OCP1z0-047 :2013-07-19 Rules of Precedence――括号的使用

    这道题目的意思是你的公司决定给所有呆到5年或5年以上的所有员工每个月加50美元,然后算出总的年薪.每个月薪水:salary,每个月加到:salary+50,总的年薪: (salary+50)*12. ...

随机推荐

  1. WebService 通用接收方法

    /** * @Title: getNetStatusRequest * @Description: TODO(2.1检查网络状态字符串) * @param: * @return: String * @ ...

  2. 行变列 pivot

    SELECT p.City , [临时] , [会员] , VIPFROM ( SELECT c.CustomerID , c.City , CASE WHEN COUNT(o.OrderID) &l ...

  3. Unity 安卓Jar包的小错误

    好久没写博客了,也就意味着好久没有学习了,近几天在搞Unity接入有米的SDk遇到了一点小错误,今天早上解决了,和大家分享下! 1,我们的目的是在在U3D中调用Android产生的Jar包,首先在Ec ...

  4. 搭建高可用mongodb集群—— 分片

    从节点每个上面的数据都是对数据库全量拷贝,从节点压力会不会过大? 数据压力大到机器支撑不了的时候能否做到自动扩展? 在系统早期,数据量还小的时候不会引起太大的问题,但是随着数据量持续增多,后续迟早会出 ...

  5. 配置基于NotePad++工具下的C#开发环境

    1.打开NotePad++,打开Notepad++的插件(plugins)菜单-->Plugin Manager-->Show Plugin Manager-->勾选NppExec- ...

  6. 枚举 enum

    typedef enum : NSUInteger { <#MyEnumValueA#>, <#MyEnumValueB#>, <#MyEnumValueC#>, ...

  7. SqlLikeAttribute 特性增加 左、右Like实现

    SqlLikeAttribute 特性原来只实现了全Like,今天增加左.右Like实现 更新时间:2016-04-30 /// <summary> /// 获取查询条件语句 /// &l ...

  8. USACO 1.4 ariprog 解题报告

    这是继虫洞之后又让我为难的一个 剪枝题目,无论如何,做的再快,也只能过6个点,最后三个点也TLE.后来参考了一下标答,大概思路是这样的. 朴素算法就不多说了,枚举a,b然后判断就行,网上说这样优化到位 ...

  9. phonegap安卓环境下使用BarcodeScanner插件扫描二维码教程

    由于一直在使用phoneGap来开发安卓应用,而对于原生Java小白的我最近这几天一直陷入了如何使用phonegap的BarcodeScanner插件这件事情上,可以说查遍了百度和Google,虽然只 ...

  10. Windows上Python3.5安装Scrapy(lxml)

    常用网址: Python 3.5: https://www.python.org/downloads/ Wheel文件:http://www.lfd.uci.edu/~gohlke/pythonlib ...