2013-06-26 92 views
1

我想在XAMPP上安裝ZendFramework最新版本。我在環境變量上添加了XAMPP目錄.XAMPP服務器在8080端口上正常工作。之後,我安裝了git並分別運行下面的命令:XAMPP上的Zend Framework 2.2.1

git clone git://github.com/zendframework/ZendSkeletonApplication.git zendtest 
cd zendtest 
php composer.phar self-update 
php composer.phar install 

我沒有收到任何錯誤。從那以後,我添加了這些行到C:\ XAMPP的\ apache的\的conf \額外\ HTTP-vhosts.conf文件:

<VirtualHost *:8080> 

    <DocumentRoot "C:/xampp/htdocs/zendtest/public" 
    ServerName www.zendtest.loc zendtest.loc 
    ServerAlias zendtest.loc 
    <Directory "C:/xampp/htdocs/zendtest/public"> 
     DirectoryIndex index.php 
     AllowOverride All 
     Order allow,deny 
     Allow from all 
    </Directory> 
</VirtualHost> 

<VirtualHost *:8080> 
    <DocumentRoot "C:\xampp\htdocs"> 
    ServerName localhost 
</VirtualHost> 

,並將此行hosts文件:

127.0.0.1:8080 zendtest.loc localhost 

有了這些調整幅度XAMPP上的apache服務器不起作用。當我按下apache服務器的啓動按鈕時,XAMPP應用程序不響應。每當我恢復http-vhosts.conf文件時,XAMPP都能正常工作。我究竟做錯了什麼?

+1

您的Appache開始了嗎?我不是專家,但據我所知,「ServerName www.zendtest.loc」是一行所允許的。您的'ServerAlias zendtest.loc'是別名 – Sam

+0

Apache無法啓動。但是如果我恢復httpd-vhosts.conf文件,它會啓動。我猜ServerAlias不是重點。沒有必要。 –

回答

0
I am able to notice a typo error in the httpd-vhosts.conf file. Please replace this line <DocumentRoot "C:/xampp/htdocs/zendtest/public" with DocumentRoot "C:/xampp/htdocs/zendtest/public" (remove the preceding angular bracket). 

I checked this in my local box Xampp was refusing to start but works fine after removing the angular bracket.