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服務的網頁主機,下列警告訊息可能出現在控制台或錯誤日誌,即使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.幸運的消息僅僅是一個警告訊息,並不會影響功能的網絡服務器,因此主辦的網站服務器上仍可以適當方式送達。 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/目錄/ 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相關文章
- cPanel WHM Failed to Receive Status Information From Apache Error的cPanel的WHM沒有獲得狀態信息,從阿帕奇誤差
- Request URL /server-status or 404 Page Not Found Apache Error請求的URL /服務器的地位或404未找到網頁阿帕奇誤差
- 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與Apache 2.2 , 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阿帕奇地位(的WHM服務器的地位)在的cPanel虛擬主機提供商聯繫管理員返回空白頁
- Starting Apache HTTPD Failed Due to Cannot Open or No Such mod_bwlimited, mod_log_bytes or mod_bandwidth Files從阿帕奇的httpd ,卻因為無法打開或沒有這樣的mod_bwlimited , mod_log_bytes或mod_bandwidth檔案
- gmmktime Error in WordPress and MagpieRSS gmmktime在WordPress的錯誤和MagpieRSS
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 2 Web服務器安裝在Windows XP中使用的Apache2 , PHP5和MySQL4 -第2部分
- Subversion (SVN) Issues and Problems on mod_dav_svn in FreeBSD顛覆( SVN )問題和存在的問題在FreeBSD的mod_dav_svn

































August 20th, 2007 19:30 2007年八月二十○日19:30
[...] people on the web say stuff like ‘change the *:80 to a _default_:80′ or similar - focusing on tricking [...] [...]人在網站上說,像是'改變* : 80至_default_ : 80 '或類似的-把重點放在誘騙[ ...]
July 10th, 2008 19:05二○○八年7月10日19:05
[...] Still, now that I’m running my own VPS, I might as well get it fixed. [...]不過,現在我運行我自己的定位系統,我也可能得到解決。 So here’s it.因此,在這裡就是這樣。 [...]