Lumen 主页在 AWS 上工作但其他人不工作

Lumen home page working but not others on AWS

我是 运行 Elastic beanstalk 上的 Lumen 应用程序 索引(主页)页面有效,但其他页面无效

Base url returns 索引页。 "Base url + /info" 给我 404

我检查了日志,没有看到任何提及。我给存储文件夹777权限,也没有喜悦。这很奇怪,因为索引页已被缓存并且正在工作。

该应用程序在本地完美运行

我是不是遗漏了什么明显的东西?

谢谢!

*****编辑*****

更多信息:

public/htaccess

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

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

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

路线

$router->get('/', 'HomeController@index');
$router->get('info', 'HomeController@info');

家庭控制器

public function index() {

return view('index');

}

public function info() {

    return view('info');

}

索引页面和信息页面都扩展了位于 resources/views/layouts

中的应用程序布局页面

在 Nginx 服务器上,例如 Elastic beanstalk,必须按照此处所述编辑服务器配置: https://lumen.laravel.com/docs/5.1

在服务器数组中添加:

location / {
try_files $uri $uri/ /index.php?$query_string;
}