第一種-通過(guò)設(shè)置不同的端口來(lái)配置
1創(chuàng)建一個(gè)目錄,作為接口
2設(shè)置apche虛擬主機(jī)(不用配置虛擬目錄映射)
httpd.conf開(kāi)啟虛擬主機(jī)配置,接著到httpd-vhosts.conf里面設(shè)置
//這里改變端口
DocumentRoot "D:/myblog" //這個(gè)就是第一步創(chuàng)建的接口
DirectoryIndex index.html index.htm index.php
Options FollowSymLinks
Allowoverride None
order Allow,deny
Allow from all
DocumentRoot "D:/baidu"
DirectoryIndex index.html index.htm index.php
Options FollowSymLinks
Allowoverride None
order Allow,deny
Allow from all
3-到httpd.conf文件里面修改監(jiān)聽(tīng)端口
Listen 80
Listen 81
4-到host文件里面修改映射.登錄網(wǎng)站時(shí)候記得加端口號(hào)。
第二種方法:通過(guò)ServerName配置
1創(chuàng)建一個(gè)目錄,作為接口
2設(shè)置apche虛擬主機(jī)(不用配置虛擬目錄映射)
httpd.conf開(kāi)啟虛擬主機(jī)配置,接著到httpd-vhosts.conf里面設(shè)置
//記得ip必須為*否則不行的
DocumentRoot "D:/myblog" //目錄
ServerName www.lengai.com //域名
DirectoryIndex index.html index.htm index.php
Options FollowSymLinks
Allowoverride None
order Allow,deny
Allow from all
DocumentRoot "D:/baidu"
ServerName www.beijing.com
DirectoryIndex index.html index.htm index.php
Options FollowSymLinks
Allowoverride None
order Allow,deny
Allow from all
3重啟apache。就可以了,當(dāng)然要配置hosts
fqj
-
虛擬機(jī)
+關(guān)注
關(guān)注
1文章
972瀏覽量
30466
發(fā)布評(píng)論請(qǐng)先 登錄
虛擬機(jī)數(shù)據(jù)恢復(fù)—虛擬機(jī)vmdk文件被刪除的數(shù)據(jù)恢復(fù)案例
服務(wù)器數(shù)據(jù)恢復(fù)—EqualLogic存儲(chǔ)硬盤(pán)離線導(dǎo)致上層虛擬機(jī)不可用的數(shù)據(jù)恢復(fù)案例
Arm架構(gòu)助力Azure Cobalt 100虛擬機(jī)工作負(fù)載性能提升
虛擬機(jī)數(shù)據(jù)恢復(fù)—異常斷電致ESXI存儲(chǔ)失聯(lián)?這份實(shí)戰(zhàn)數(shù)據(jù)恢復(fù)案例請(qǐng)收好
蜂鳥(niǎo)e203在虛擬機(jī)unbuntu上面驗(yàn)證時(shí)報(bào)錯(cuò)的可能原因及解決措施
搭建自己的ubuntu系統(tǒng)之創(chuàng)建ubuntu虛擬機(jī)
中軟國(guó)際鴻云虛擬機(jī)安裝指南
迅為RK3588開(kāi)發(fā)板掛載Windows以及虛擬機(jī)Ubuntu測(cè)試
TECS OpenStack資源池虛擬機(jī)網(wǎng)絡(luò)二層地址無(wú)法互通的問(wèn)題處理
虛擬化數(shù)據(jù)恢復(fù)—XenServer虛擬化平臺(tái)上VPS不可用的數(shù)據(jù)恢復(fù)案例
Vsan數(shù)據(jù)恢復(fù)——Vsan分布式文件系統(tǒng)上虛擬機(jī)不可用的數(shù)據(jù)恢復(fù)
分布式存儲(chǔ)數(shù)據(jù)恢復(fù)—虛擬機(jī)上hbase和hive數(shù)據(jù)庫(kù)數(shù)據(jù)恢復(fù)案例
Linux內(nèi)核編譯失敗?移動(dòng)硬盤(pán)和虛擬機(jī)的那些事兒
關(guān)于apache配置多ip虛擬機(jī)2種方法的分享
評(píng)論