歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> 更多Linux >> Apache 兩種虛擬主機方式的區別

Apache 兩種虛擬主機方式的區別

日期:2017/2/27 9:29:49   编辑:更多Linux
  大多數人可能就知道 Apache 的基於名字的虛擬主機,不知道 Apache 還可以有基於 IP 的虛擬主機。前者的道理不言自明,多個域名(服務器)對應一個 IP 地址,配置方法為:     NameVirtualHost 111.22.33.44     ServerName www.sample.com   DocumentRoot /www/sample     ServerName www.sample2.com   DocumentRoot /www/sample2     但是在有些 IP 地址充裕,但是機器資源緊張的環境下,我們可能要把多個域名解析到同一台機器上,其配置方法為:     ServerName www.smallco.com   DocumentRoot /groups/smallco/www     ServerName www.baygroup.org   DocumentRoot /groups/baygroup/www     這種方法下,要求機器配置多個 IP 地址。




Copyright © Linux教程網 All Rights Reserved