2017-08-04 145 views
0

以前,當我運行'http:/ localhost /'可以帶我直接到我的xampp主頁。丟失我的本地主機目錄

我按照教程創建了一個虛擬主機並編輯hosts文件。

我WINDOWS32 hosts文件看起來像這樣

> 127.0.0.1  localhost 
> 127.0.0.1  my_test_server 
> # ::1    localhost 

我XAMMP的httpd-vhosts.conf與這些新增editeed

> <VirtualHost *:80> 
>  DocumentRoot "C:/xampp/htdocs/my_test_server/public" 
>  ServerName my_test_server 
> </VirtualHost> 

現在,這是好的,當我與

瀏覽

http://my_test_server/videos

但是當我瀏覽

http://localhost 我不回來的XAMPP索引頁。所以我不能創建一個MySQL分區 任何幫助?

+0

會發生什麼,當你去my_test_server? – Edwin

+0

我得到的視頻 – henrybbosa

+0

我的探針是本地主機不再指向xammp索引頁面 – henrybbosa

回答

2

您應該可以在本地主機服務器名稱的xampp htdocs目錄中創建另一個VirtualHost條目。

此外,如果您在httpd-vhosts.conf文件看一下例子,它說:

第一個虛擬主機部分用於不 匹配任何塊##服務器名或## ServerAlias所有請求。

所以您可能還可以只寫這個作爲第一個VirtualHost(無服務器名稱)

<VirtualHost *:80> 
    DocumentRoot "C:/xampp/htdocs/" 
</VirtualHost>