Blog.wlens.top
538 字
3 分钟
Nextcloud 常见问题及解决方案:配置、安全与性能优化

PHP configuration option output_buffering must be disabled
其实这个很好解决,PHP默认是有4096字节缓冲的。但是Nextcloud希望你关闭。如果你是自己安装的PHP,在你安装PHP的路径下,打开PHP配置文件(php.ini),将
output_buffering = 4096
改成
; output_buffering = 4096
您的数据目录和文件可以从互联网直接访问。.htaccess 文件不起作用。强烈建议您配置 Web 服务器,以便数据目录不再可访问,或者您可以将数据目录移动到 Web 服务器文档根目录。
其实是Nginx的问题,为了进一步提升安全性,我们打开Nginx网站设置,在location内的禁止访问目录内,加入data目录。
.md|data
PHP 的安装似乎不正确,无法访问系统环境变量。getenv(“PATH”) 函数测试返回了一个空值
env[PATH] = /usr/local/bin:/usr/bin:/bin:/usr/local/php/bin
之后,可能需要重载PHP配置或者重启PHP服务才能生效。
您的网页服务器未正确设置以解析**。更多信息请参见文档**
这个处理方法很简单,简单地说,设置Nginx即可。如果你的Nginx是宝塔安装的,那么打开网站的Nginx:
之后追加以下内容:
rewrite /.well-known/carddav /remote.php/dav permanent;rewrite /.well-known/caldav /remote.php/dav permanent;
您的网页服务器未正确设置以解析“/.well-known/webfinger”。更多信息请参见文档。
您的网页服务器未正确设置以解析“/.well-known/nodeinfo”。更多信息请参见文档。
在网站 Nginx 配置中添加下述代码即可解决:
location ^~ /.well-known { # The rules in this block are an adaptation of the rules # in `.htaccess` that concern `/.well-known`.
location = /.well-known/carddav { return 301 /remote.php/dav/; } location = /.well-known/caldav { return 301 /remote.php/dav/; }
location /.well-known/acme-challenge { try_files $uri $uri/ =404; } location /.well-known/pki-validation { try_files $uri $uri/ =404; }
# Let Nextcloud's API for `/.well-known` URIs handle all other # requests by passing them to the front-end controller. return 301 /index.php$request_uri; }
也可以尝试关掉此项检查警告,方法为在 Nextcloud 目录下 /config/config.php 文件中添加一行
'check_for_working_wellknown_setup' => false,
后台任务优化
如果你用宝塔面板,也可以直接使用宝塔自带的控制面板,设置定时任务:
cd /www/wwwroot/程序目录/sudo -u www php cron.php
Nextcloud 常见问题及解决方案:配置、安全与性能优化
https://blog.wlens.top/posts/nextcloud-遇到的问题总结/