`
Phoenix_MVP
  • 浏览: 336514 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

NameVirtualHost

 
阅读更多

NameVirtualHost是core模块中的一个指令

说明 为一个基于域名的虚拟主机指定ip地址和端口
语法 NameVirtualHost addr:port
作用域 server config
状态 核心(C)
模块 core

 

 

<VirtualHost>指令的参数必须与NameVirtualHost指令的参数完全匹配。

 

报错示例:

   (1)错误的httpd.conf配置:

NameVirtualHost *
<VirtualHost *:80>
    ServerName list.xxx.net
    DocumentRoot /home/admin/lpmall/htdocs
    Alias /info/ "/home/admin/newcms/htdocs/info/"
</VirtualHost>

 (2)错误信息

[admin@v015209 ~/lpmall/bin]$ ./apachectl restart
/opt/taobao/install/httpd/bin/httpd -f /home/admin/lpmall/conf/httpd.conf -k restart
[Thu Sep 20 20:20:28 2012] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results

 (3)如果NameVirtualHost 带上端口,而VirtualHost没带上端口,虽然启动不会像向上面一样报错,但是下面的rewrite规则会失效

 

 

分享到:
评论

相关推荐

    Apache NameVirtualHost *:80 has no VirtualHosts问题解决办法

    当启动apache的时候,如果事件管理器出现“Apache NameVirtualHost *:80 has no VirtualHosts”错误时,大部分是因为修改了apache的httpd.conf配置文件,将extra/vhosts.conf文件引入到httpd.conf中了。 代码如下:#...

    appache服务 我了个去,还有字数不少于11个字

    在最后一处:(namevirtualhost *:80)可以用来命名虚拟主机 打开: namevirtualhost *:80 *:80&gt; serveradmin root@king.example.com(服务器出错的 邮箱) documentroot=/var/www/html/virt1(要建立文件) ...

    httpd-2.4.28

    NameVirtualHost directive No longer needed and is now deprecated. Override Configuration The new AllowOverrideList directive allows more fine grained control which directives are allowed in .htaccess ...

    apahce2.2.4整合tomcat6.0.016

    NameVirtualHost love ServerAdmin hackq@163.com DocumentRoot D:/workspace/jlitshopGAO/WebRoot/ ServerName love DirectoryIndex index.html index.htm index.php index.jsp Options -Indexes ...

    Apache2.0中文手册(chm格式)

    另外,Listen, NameVirtualHost和VirtualHost 指令支持IPv6的数字地址串(比如:“Listen [fe80::1]:8080”)。 过滤 Apache的模块现在可以写成过滤器的形式, 当内容流经它到服务器或从服务器到达的时候进行处理...

    apache2 chm 手册

    另外,Listen, NameVirtualHost和VirtualHost 指令支持IPv6的数字地址串(比如:“Listen [fe80::1]:8080”)。 过滤 Apache的模块现在可以写成过滤器的形式, 当内容流经它到服务器或从服务器到达的时候进行处理。 ...

    配置阿帕奇1.PHP4.23在WindowsXP下的IIS和Apache2两种服务器上的安装实例 http://www.phpe.net/articles/260.shtml

    NameVirtualHost 127.0.0.1 //或localhost 找到: 修改下面几行: ServerAdmin (你刚才安装时候输入的管理员信箱) DocumentRoot D:\apache2\Apache2\htdocs ServerName Apache2 # ErrorLog logs/dummy-host...

    apache反向代理

    NameVirtualHost 1.2.3.4:80 &lt; VirtualHost 1.2.3.4:80 &gt; ServerAdmin root@company.com DocumentRoot /usr/local/apache/htdocs ServerName default.company.com ErrorLog /usr/local/apache_...

    Apache配置 虚拟转向实例

    NameVirtualHost *:80 这个一定要 然后把主的ServerAdmin丢最下面 ///////////////////// NameVirtualHost *:80 &lt;VirtualHost&gt; ServerName abccccc.com ProxyPass / http://localhost:8088/ ProxyPassReverse...

    Apache2中实现多网站域名绑定的实现方法

    配置环境 系统:win7 PHP版本:5.3.x MYSQL 版本:5.0.27 Apache:2.2.4 (Win32) 设置方法: 打开D:\wamp\bin\apache\Apache2.2.17\conf\httpd.conf 在最后添加 NameVirtualHost *:80 &lt;VirtualHost&gt; DocumentRoot “D:...

    windows apache多端口虚拟主机配置方法

    1、打开httpd.conf,查找Listen:80,在...4、查找NameVirtualHost *:80,在下面一行增加NameVirtualHost *:8080;5、复制httpd-vhosts.conf文件最下面的如下代码,并且在下面粘贴一份: 代码如下: ServerAdmin webmast

    apache编译参数+目录结构+conf1

    apache编译参数+目录结构NameVirtualHost *:80 基于域名的虚拟主机28 ServerAdmin webmaster@dummy-host

    ubuntu下修改apache端口

    root@ubuntu:/etc/apache2# pwd /etc/apache2 root@ubuntu:/etc/apache2# vim ports.conf 8 NameVirtualHost *:81

    ubuntu 下安装apache

    root@ubuntu:/etc/apache2# pwd /etc/apache2 root@ubuntu:/etc/apache2# vim ports.conf 8 NameVirtualHost *:81

    apache 虚拟主机配置技巧

    NameVirtualHost 111.22.33.44  ServerName  DocumentRoot /www/sample  ServerName  DocumentRoot /www/sample2  但是在有些 IP 地址充裕,但是机器资源紧张的环境下,我们可能要把多个域名解析到同一台...

    Apache服务器一个IP多个站点的配置方法示例

    在日常的网站发布中很多情况下都无法做到一个IP对应一个站点,在IP4的情况下IP的资源是相对有限的。然而作为最流行的Apache自然也考虑到...NameVirtualHost 192.168.1.104 ServerName www.php.com ServerAdmin test

    Apache 解决80端口占用问题

    AH00548: NameVirtualHost has no effect and will be removed in the next release D:/phpStudy/Apache/conf/extra/httpd-vhosts.conf:34 (OS 10013)以一种访问权限不允许的方式做了一个访问套接字的尝试。 : AH...

    Linux系统配置Apache虚拟主机实例

    php: yum install httpd php 假设VPS的IP是58.130.17.168,有两个域名指向该IP,分别是domain1.com, domain2.com, 修改/etc/httpd/conf/httpd.conf,在文件的后加入: ServerName 58.130.17.168 NameVirtualHost ...

Global site tag (gtag.js) - Google Analytics