Xampp Apache 配置虛擬網域名稱

2021-08-17 16:37:03 字數 522 閱讀 5163

1.找到 c盤 window->system32->drivers->etc->hosts檔案用記事本開啟,往裡面新增

2.找到在c盤xampp目錄進入apache->conf->extra->httpd-vhosts.conf檔案,記事本開啟在最後新增

serveradmin [email protected]  

documentroot "c:\xampp\htdocs"  

servername www.lucian.com  

options indexes followsymlinks includes execcgi  

allowoverride all  

require all granted  

解析  documentroot  為伺服器訪問的目錄; servername 為剛才設定的虛擬網域名稱。

重啟apache伺服器就可以訪問了

xampp apache建立虛擬目錄

1 用記事本開啟c windows system32 drivers etc hosts檔案,配置如下 127.0.0.1 phptest 注,如果在瀏覽器位址列輸入phptest被搜尋引擎導航到搜尋頁,請在前面加http 2 xampp control panel apache config ht...

XAMPP Apache 配置多埠和多網域名稱方法

我們在工作中經常遇到同時除錯多個 的情況,那麼如何配置呢?就像平時訪問 一樣,a.com 與 b.com 截然不同。這都是常見現象,如果在區域網中要訪問另外一台電腦上的多個 就需要使用 形式訪問,而不是 http localhost http 協議預設埠號是 80,如果我們可以設定不同的埠號,讓伺服...

XAMPP Apache 配置多埠和多網域名稱方法

在專案中,我們經常要將網域名稱解析到本地,也就是在本機上新增乙個虛擬主機。可能像這樣 其中的埠號建議不使用系統所保留 即 1024 以下 的 或者是 com comxampp 安裝路徑 d xampp htdocs apache 所在位置 d xampp apache 1 d xampp htdoc...