报错信息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. 把Storyboard减轻的方法

    把Storyboard减轻的方法 by 伍雪颖 UIViewController *secondStoryboard = [[UIStoryboard storyboardWithName:@&quo ...

  2. drupal 7.23 上传中文命名文件bug

    $file->filename = trim(drupal_basename($_FILES['files']['name'][$source]), '.'); //在此行下 添加以下代码即可( ...

  3. 网页被Chrome识别成英语,区域,语言,网站

    修改成这个后解决 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" ...

  4. Android 判断文件的类型

    import java.util.HashMap; import java.util.Iterator; /** * 判断文件的类型 */ public class MediaFileUtil { p ...

  5. Linux下MySql出现#1036 – Table ‘ ‘ is read only 错误解决方法

    本文为转载内容,感谢原作者.原文出自:http://zhaoxiaoru39.blog.163.com/blog/static/609552192012511104730115/ 我遇到的问题是:在n ...

  6. rowid的作用

    一.快速删除重复的记录的方法: 1.通过创建临时表删除重复的的记录 1)创建emp表的临时表,把数据导入临时表中,删除原来的表中的数据然后把临时表中的数据导入原表 create table emp_t ...

  7. IE9以下通过css让html页面背景图片铺满整个屏幕

    第一种方法不设为背景图片,通过css来控制样式,可兼容到IE6,代码如下: <!DOCTYPE html> <html lang="en"> <hea ...

  8. DOM事件一览表

    type Bubbling phase Cancelable Target node types DOM interface DOMActivate Yes Yes Element UIEvent D ...

  9. Android Studio rename module Can't rename root module

    Android Studio修改工程根目录的时候会报错, rename module Can't rename root module. 主要是该工程已经打开,再命名必须要关闭改工程,就跟正在写一个t ...

  10. ORACLE DUAL表详解 .

    今天在戴明明同学的QQ空间里看到篇不错的关于DUAL表的文章,自己平时也时而会用到,可是没有系统的学习过,借这个机会学习学习~ ==================================== ...