Apache Warn NameVirtualHost *:80 Has No VirtualHosts Error When Start阿帕奇警告namevirtualhost * : 80没有virtualhosts时发生错误开始
When start Apache web server or restart the HTTPD service on web host, the following warning message may appears on console or error log, even though Apache HTTP service can still startup and running fine without error.当启动Apache Web服务器或重新启动的httpd服务, Web主机,下面的警告消息,可能会出现在控制台或错误日志,即使Apache的HTTP服务仍然可以启动和运行的罚款,没有错误。
[warn] NameVirtualHost *:80 has no VirtualHosts [警告] namevirtualhost * : 80没有virtualhosts
where * can be asterisk itself (*), hostname or IP address.其中*可以本身的星号( * ) ,主机名或IP地址。
Luckily the message is just a warning message and does not affect the functionality of web server, and hence the websites hosted on the server can still be served properly.幸运的讯息,只是一个警告讯息,并不会影响功能的Web服务器,因此网站上托管的服务器,仍然是可以妥善的服务。 The possible cause for this problem’s symptom is incorrect use of NameVirtualHost.可能的原因对于这个问题的症状是不正确使用namevirtualhost 。
When the server, dedicated or virtual private server web host, has only one IP address, websites are hosted by Apache via name based virtual hosting.当服务器,专用或虚拟专用服务器的虚拟主机,只有一个IP地址,网站代管由Apache通过名称为基础的虚拟主机。 In this case, there should be only one NameVirtualHost been defined.在这种情况下,应该只有一个namevirtualhost已确定了。 For example,举例来说,
NameVirtualHost *:80 namevirtualhost * : 80
<VirtualHost *:80> <virtualhost *:80>
servername host服务器主机
serverPath /public_html/ serverpath / public_html /
DocumentRoot /public_html/ documentroot / public_html /
</VirtualHost> < /虚拟主机>
The name of one or more virtual hosts (websites’ domain name) is defined by “servername” directive.的名称,一个或多个虚拟主机(网站域名)的定义是“服务器”的指令。 So if you have more than one websites hosted on a single IP address, you will have one NameVirtualHost declaration and many VirtualHost sections to configure those domains.因此,如果你有一个以上的网站设于一个单一的IP地址,你将有一个namevirtualhost宣言和许多虚拟主机部分配置这些领域。
Beside, try at best to use IPs or * for the NameVirtualHost and <VirtualHost> directives.旁边,尝试在最好地利用IP或*为namevirtualhost和<virtualhost>指示。 In some cases, where the website is assigned a dedicated IP address where only one virtual host is declared, the NameVirtualHost can even be dropped.在有些情况下,该网站被分配到一个专用的IP地址的地方只有一个虚拟主机是宣布, namevirtualhost ,甚至可以下降。
For more example on how VirtualHost supposed to be setup, visit更多的例子就如何虚拟主机是为了安装,请访问 Apache 2.2 documentation阿帕奇2.2文件 or或 Apache 1.3 documentation Apache 1.3的文件 (more common version of Apache used currently as most control panel such as cPanel comes with this, although it’s going to be upgraded in cPanel 11). (更常见的版本的Apache使用目前,由于大部分控制面板等的cPanel说到这,虽然它的进行升级,在的cPanel 11 ) 。
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 重要说明 :这是一个机器翻译网页是“按原样”提供的担保。 Machine translation may be difficult to understand.机器翻译可能很难理解。 Please refer to请参阅 original English article英文原版的文章 whenever possible.只要有可能。
Share and contribute or get technical support and help at分享和贡献,或取得技术的支持和帮助,在 My Digital Life Forums 我的数字生活论坛 . 。
Related Articles相关文章
- Request URL /server-status or 404 Page Not Found Apache Error请求网址/服务器的地位或404未找到网页Apache的错误
- cPanel WHM Failed to Receive Status Information From Apache Error的cPanel的WHM没有收到状态信息从Apache的错误
- winnt_accept: Asynchronous AcceptEx failed Error in Apache Log winnt_accept :异步acceptex失败错误在Apache日志
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 4安装Web服务器在FreeBSD的6.0与2.2的Apache , MySQL 5.0的和PHP 5 -第4部分
- FreeBSD Apache HTTP Accept Filter Error FreeBSD上的Apache的HTTP接受过滤器的错误
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Apache的地位(的WHM服务器的地位)在网页主机的cPanel经理回报的空白页
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files开始的Apache的httpd失败,由于无法打开,或没有这样的mod_bwlimited , mod_log_bytes或mod_bandwidth档案
- gmmktime Error in WordPress and MagpieRSS gmmktime误差在WordPress和magpierss
- Subversion (SVN) Issues and Problems on mod_dav_svn in FreeBSD颠覆( svn )问题和困难就mod_dav_svn在FreeBSD上
- Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header改善Apache Web服务器安全:使用servertokens和serversignature禁用标题
















August 20th, 2007 19:30 2007年8月20日19时30分
[...] people on the web say stuff like ‘change the *:80 to a _default_:80′ or similar - focusing on tricking [...] [ … … ]人在网路上说的东西一样, ' *改变:从80到1 _default_ : 80 '或类似的-重点放在诱骗[ … … ]
July 10th, 2008 19:05 2008年7月10日19时05分
[...] Still, now that I’m running my own VPS, I might as well get it fixed. [ … … ] ,但现在我运行我自己的电子道路收费,我可能会以及得到固定。 So here’s it.因此,这里的。 [...] [ … … ]