Apache文件夹没有显示出来

问题描述 投票:1回答:2

我在托管环境中安装Laravel 4应用程序时遇到问题。

我现在遇到的问题是,当访问www.eversite.be/laravel/时,“公共”文件夹没有显示在列表中,有人可以告诉我为什么会这样,以及如何让它可见。

这是否与Apache有关,例如,权限设置?这很奇怪,因为我已经将文件夹更改为777。

Apache错误日志:

[Mon Jan 13 17:47:11 2014] [alert] [client 178.116.245.86] /sites/eversite.be/www/laravel/public/.htaccess: Options not allowed here
[Mon Jan 13 17:47:19 2014] [alert] [client 178.116.245.86] /sites/eversite.be/www/laravel/public/.htaccess: Options not allowed here
[Mon Jan 13 17:47:23 2014] [alert] [client 178.116.245.86] /sites/eversite.be/www/laravel/public/.htaccess: Options not allowed here

/ public /中的.htaccess文件

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews
    </IfModule>

    RewriteEngine On

    # Redirect Trailing Slashes...
    RewriteRule ^(.*)/$ /$1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

phpinfo()的链接; :http://eversite.be/laravel/modrewrite.php

laravel apache .htaccess laravel-4
2个回答
1
投票

在您的更新中,您的文件路径似乎不正确。如果我没有弄错的话,_DIR__可能在PHP 5.2中不可用,这是您正在使用的版本。改为使用:

dirname(__FILE__)

0
投票

由于打开http://eversite.be/laravel/public会触发500内部服务器错误,我会说你在public/.htaccess中设置无效。您现在需要检查服务器日志以查找真实的错误消息。

© www.soinside.com 2019 - 2024. All rights reserved.