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的时候,如果事件管理器出现“Apache NameVirtualHost *:80 has no VirtualHosts”错误时,大部分是因为修改了apache的httpd.conf配置文件,将extra/vhosts.conf文件引入到httpd.conf中了。 代码如下:#...
在最后一处:(namevirtualhost *:80)可以用来命名虚拟主机 打开: namevirtualhost *:80 *:80> serveradmin root@king.example.com(服务器出错的 邮箱) documentroot=/var/www/html/virt1(要建立文件) ...
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 ...
NameVirtualHost love ServerAdmin hackq@163.com DocumentRoot D:/workspace/jlitshopGAO/WebRoot/ ServerName love DirectoryIndex index.html index.htm index.php index.jsp Options -Indexes ...
另外,Listen, NameVirtualHost和VirtualHost 指令支持IPv6的数字地址串(比如:“Listen [fe80::1]:8080”)。 过滤 Apache的模块现在可以写成过滤器的形式, 当内容流经它到服务器或从服务器到达的时候进行处理...
另外,Listen, NameVirtualHost和VirtualHost 指令支持IPv6的数字地址串(比如:“Listen [fe80::1]:8080”)。 过滤 Apache的模块现在可以写成过滤器的形式, 当内容流经它到服务器或从服务器到达的时候进行处理。 ...
NameVirtualHost 127.0.0.1 //或localhost 找到: 修改下面几行: ServerAdmin (你刚才安装时候输入的管理员信箱) DocumentRoot D:\apache2\Apache2\htdocs ServerName Apache2 # ErrorLog logs/dummy-host...
NameVirtualHost 1.2.3.4:80 < VirtualHost 1.2.3.4:80 > ServerAdmin root@company.com DocumentRoot /usr/local/apache/htdocs ServerName default.company.com ErrorLog /usr/local/apache_...
NameVirtualHost *:80 这个一定要 然后把主的ServerAdmin丢最下面 ///////////////////// NameVirtualHost *:80 <VirtualHost> ServerName abccccc.com ProxyPass / http://localhost:8088/ ProxyPassReverse...
配置环境 系统: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 <VirtualHost> DocumentRoot “D:...
1、打开httpd.conf,查找Listen:80,在...4、查找NameVirtualHost *:80,在下面一行增加NameVirtualHost *:8080;5、复制httpd-vhosts.conf文件最下面的如下代码,并且在下面粘贴一份: 代码如下: ServerAdmin webmast
apache编译参数+目录结构NameVirtualHost *:80 基于域名的虚拟主机28 ServerAdmin webmaster@dummy-host
root@ubuntu:/etc/apache2# pwd /etc/apache2 root@ubuntu:/etc/apache2# vim ports.conf 8 NameVirtualHost *:81
root@ubuntu:/etc/apache2# pwd /etc/apache2 root@ubuntu:/etc/apache2# vim ports.conf 8 NameVirtualHost *:81
NameVirtualHost 111.22.33.44 ServerName DocumentRoot /www/sample ServerName DocumentRoot /www/sample2 但是在有些 IP 地址充裕,但是机器资源紧张的环境下,我们可能要把多个域名解析到同一台...
在日常的网站发布中很多情况下都无法做到一个IP对应一个站点,在IP4的情况下IP的资源是相对有限的。然而作为最流行的Apache自然也考虑到...NameVirtualHost 192.168.1.104 ServerName www.php.com ServerAdmin test
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...
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 ...