apache 虛擬主機配置
1, 常見配置
##配置乙個虛擬主機
serveradmin fengjun
##指定主目錄
documentroot "e:\\php"
errorlog "logs/fengjun-error.log"
customlog "logs/fengjun-access.log" combined
2,單獨操作目錄許可權
serveradmin fengjun
documentroot "e:\\php"
errorlog "logs/fengjun-error.log"
customlog "logs/fengjun-access.log" combined
##配置目錄屬性
options indexes followsymlinks includes execcgi
allowoverride all
order allow,deny
allow from all
3,主機頭方式(乙個主機同乙個埠繫結多個網域名稱)
##開啟以網域名稱訪問方式 -- 不開啟,會訪問到第乙個匹配的虛擬主機
namevirtualhost *:80
options indexes followsymlinks includes execcgi
allowoverride all
order allow,deny
allow from all
serveradmin fengjun
documentroot "e:\\php\\home"
##指定網域名稱
servername home.fengjun.com
errorlog "logs/fengjun-error.log"
customlog "logs/fengjun-access.log" combined
serveradmin fengjun
documentroot "e:\\php\\study"
##指定網域名稱
servername study.fengjun.com
errorlog "logs/fengjun-error.log"
customlog "logs/fengjun-access.log" combined
apache虛擬主機配置
之前已經在csdn上上傳過apache的文件在這裡補充說明一下,apache2.2.x與tomcat或iis或三者之間的虛擬主機配置。介紹一下如何整合其他 web伺服器,如 iis tomcat 等。網上有 n多整合方案講的都不是很清楚 特別是 windows 下的 這裡要特別提示一下,apache...
apache虛擬主機配置
多個網域名稱 伺服器 對應乙個 ip 位址,配置方法為 namevirtualhost 111.22.33.44 servername www.sample.com documentroot www sample servername www.sample2.com documentroot www...
apache配置虛擬主機
namevirtualhost 80 directoryindex default.php index.html index.php index.htm servername www.host1.com servername host1 com documentroot d wamp www1 er...