2016-02-10 47 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