首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >流明: RoutesRequests.php线路229中的NotFoundHttpException,调度器NOT_FOUND

流明: RoutesRequests.php线路229中的NotFoundHttpException,调度器NOT_FOUND
EN

Stack Overflow用户
提问于 2019-10-23 02:54:36
回答 1查看 1.1K关注 0票数 0

我尝试了一个带有laravel-passport的vue-lumen-tutorial。除了LoginController (通过用户和密码登录)之外,所有的工具都可以正常工作。我认为这不是教程代码的问题,它更多的是服务器或幼体/流明配置的问题。但我不确定。代码在linux机器(18.04)、带有Lumen (5.8.12) (Laravel Components 5.8.*)和Passport的apache服务器上远程运行。api终结点可用,但/login终结点显示404 Not found。

我在这里找到了一些关于流明或.htaccess文件的index.php的问题/答案。Just installed Lumen and got NotFoundHttpException。但这对我没什么帮助。

我正在使用Postman进行测试:

代码语言:javascript
复制
GET  to https://domain/api/companies/     works fine, 
POST to https://domain/api/oauth/token    works fine, but
POST to https://domain/api/login          gives a 404 Not found.

The route /login is ok.
...
return app()->version(); only for testing gives a request but i need the $tokenRequest:
...
return app()->dispatch($tokenRequest); => 404 Not found
...
error message:
(1/1) NotFoundHttpException
in RoutesRequests.php line 229
...
protected function handleDispatcherResponse($routeInfo)
{
switch ($routeInfo[0]) {
case Dispatcher::NOT_FOUND:
throw new NotFoundHttpException;   <== 229
case Dispatcher::METHOD_NOT_ALLOWED:
throw new MethodNotAllowedHttpException($routeInfo[1]);
case Dispatcher::FOUND:
return $this->handleFoundRoute($routeInfo);
}
}
...
Maybe a proxy issue between /oauth/token and /login? What can i do?

这里是第45行的LoginController:https://github.com/aibim/vue-lumen-tutorial/blob/master/app/Http/Controllers/LoginController.php

EN

回答 1

Stack Overflow用户

发布于 2019-10-24 23:21:27

我发现了错误。APP_URL路径.env错误。我

代码语言:javascript
复制
wrong: APP_URL=https://domain.de/public/
right: APP_URL=https://domain.de/
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58510682

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档