2016-02-10 45 views
0

我正在使用Win10與WAMP服務器。 我安裝WAMP和創建了虛擬主機Laravel項目沒有顯示我index.php

<VirtualHost *:80> 
    DocumentRoot "c:/wamp/www" 
    ServerName localhost 
    ServerAlias localhost 
    <Directory "c:/wamp/www"> 
     Options Indexes FollowSymLinks 
     AllowOverride All 
     Require local 
    </Directory> 
</VirtualHost> 

<VirtualHost *:80> 
    DocumentRoot "c:/wamp/www/project/public" 
    ServerName project 
    <Directory "c:/wamp/www/project/public"> 
     Options Indexes FollowSymLinks 
     AllowOverride All 
     Require local 
    </Directory> 
</VirtualHost> 

然後我用作曲+混帳找回項目(laravel),但是當我嘗試訪問我的項目它顯示我裏面的文件夾公衆,而不是index.php文件

這裏是我的.htaccess

<IfModule mod_rewrite.cs> 
    <IfModule mod_negotiation.c> 
     Option -MultiViews 
    </IfModule> 

     RewriteEngine On 


     # Redirect Trailing Slashes If Not A folder... 
     RewriteCond %{REQUEST_FILENAME} !-d 
     RewriteCond %{REQUEST_FILENAME} !-f 
     RewriteRule^index.php [L] 

</IfModule> 

回答

0

如果不執行PHP,檢查你的WAMP安裝。此外,檢查安裝的php-mcrypt擴展和active.In虛擬主機我用下面的配置:

<VirtualHost *:80> 
ServerName homestead.app 
DocumentRoot "c:/wamp/www/project/public" 
<Directory "c:/wamp/www/project/public"> 
Require all granted 
Options Indexes FollowSymLinks Includes ExecCGI 
AllowOverride All 
</Directory> 
</VirtualHost> 

哪裏homestead.app是你的名字,並把它添加到主機文件執行

+0

PHP( php -v回答PHP5.5.12)。對於php-mcrypt擴展在php.ini中找不到任何東西 主機已經被添加到system32中的hosts文件 – Miguel