如何解决NextCloud no app in context警告?
- By : Will
- Category : Cloud storage
Cloud storage
1 前言
一个问题,一篇文章,一出故事。
笔者今天NextCloud配置2FA登录异常,2FA可见如下提示(“We are sorry… Invalid Request”),
使用如下命令查询应用程序日志,
tail -f /var/log/nextcloud/nextcloud.log
可见如下日志,
{"reqId":"nBs1Gsd6Ai6BFHgSkBAH","level":2,"time":"2022-09-26T10:42:45+08:00","remoteAddr":"10.168.0.165","user":"--","app":"no app in context","method":"GET","url":"/index.php/apps/user_saml/saml/login?idp=1","message":"starttime:1664160165.642196","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.50","version":"23.0.2.1"}
2 最佳实践
2.1 编辑nextcloud配置
vim /var/www/nextcloud/config/config.php
加入如下配置,
'overwritehost' => 'nextcloud.cmdschool.org', 'overwriteprotocol' => 'https', 'overwrite.cli.url' => 'https://nextcloud.cmdschool.org',
2.2 测试2FA登录
https://nextcloud.cmdschool.org/index.php/apps/user_saml/saml/login?idp=1
参阅文档
================
https://github.com/nextcloud/social/issues/492
没有评论