zl程序教程

您现在的位置是:首页 >  其他

当前栏目

Lumen 配置、重写、404错误等

错误配置重写 404 Lumen
2023-09-27 14:29:03 时间

1、权限是否有设置为777;

2、app key是否有设置;

3、apache下是否有开启重写,a2enmod;

4、nginx下server的location是否配置正确,重写规则有没添加,route的路由有没有写全,即"xxx/public/xxx";

location lumen/public/ {
    root   '/var/www/html/80/lumen/public';
    index  index.html index.htm index.php;
    try_files $uri $uri/ /index.php?$query_string;
}

 

$app->get('lumen/public/', function () use ($app) {
    return $app->welcome();
});