2015-02-09 57 views
0

上塞汀文檔根我已經安裝在我的本地和第8步yii2starthttps://github.com/vova07/yii2-start)有這個指令集文件的Web服務器的根目錄yii2start - 麻煩本地Web服務器

<VirtualHost *:80> 
    ServerName www.yii2-start.domain # You need to change it to your own domain 
    ServerAlias yii2-start.domain # You need to change it to your own domain 
    DocumentRoot /my/path/to/yii2-start # You need to change it to your own path 
    <Directory /my/path/to/yii2-start> # You need to change it to your own path 
     AllowOverride All 
    </Directory> 
</VirtualHost> 

,並根據我的本地應用程序替換值

<VirtualHost *:80> 
    ServerName http://localhost/yii2start/yii2-start 
    ServerAlias http://localhost/yii2start/yii2-start 
    DocumentRoot C:/xampp/htdocs/yii2start/yii2-start 
    <Directory C:/xampp/htdocs/yii2start/yii2-start> 
     AllowOverride All 
    </Directory> 
</VirtualHost> 

現在,當我鍵入本地主機代替的XAMPP默認頁,我發現了yii2start應用,當我試圖在XAMPP/htdocs中/接取別人的網站,例如本地主機/ webapp的我得到404錯誤

爲了讓我的其他項目在htdoc中出現以及我的yii2start網站能夠改變什麼應該改變?

在此先感謝

回答

0

你並不需要一步8,如果刪除虛擬主機,應該都還是OK的工作就像其它網站這樣的完整路徑。我不確定您的網站是否可以在虛擬主機上運行,​​而不是在同一時間。

0

試試這個

<VirtualHost *:80> 
    ServerName yii2-start 
    ServerAlias yii2-start 
    DocumentRoot C:/xampp/htdocs/yii2start/yii2-start 
    <Directory C:/xampp/htdocs/yii2start/yii2-start> 
     AllowOverride All 
    </Directory> 
</VirtualHost> 

重新啓動服務器。並在瀏覽器http :: // yii2-start中打開。