Laravel:404 Not Found或403 Forbidden

时间:2015-07-09 14:18:24

标签: apache .htaccess laravel centos

我第一次尝试使用我的VPS上的Laravel框架。 在我有一个其他项目文件夹的文件夹中(没有任何访问问题)我使用“laravel new Test”创建一个项目

我更改了“storage”和“bootstrap / cache”的权限。

现在我转到页面......

  • “/ Test /”=>返回403禁止
  • “/ test / index.php”=>返回404 Not Found

启用mod_rewrite。 我将“AllowOverdrive All”设置为主文件夹。

Test / public中的.htaccess是默认值,我试图将其更改为:

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

    Options +FollowSymLinks
    RewriteEngine On

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

重启httpd。重新启动所有vps ......没有改变......

我想念的是什么?

1 个答案:

答案 0 :(得分:0)

用于访问内容的默认documentRoot位于文件夹/ p​​ublic中 因此,您可以访问www.example.com/public/

您应该将example.com的默认根目录更改为公用文件夹。

相关问题