宝塔php的opcache模块未载入,宝塔面板部署NextCloud逐一解决后台安全及设置警告...

本文记录了在宝塔面板环境下搭建Nextcloud遇到的问题及解决方案,包括PHP设置警告、fileinfo模块缺失、数据目录访问限制、HSTS头部设置、内存缓存未配置以及OPcache模块问题。通过修改PHP配置、安装扩展、调整Nginx配置以及运行OCC命令,成功解决了所有警告。
摘要由CSDN通过智能技术生成

nextcloud可以看做是一款基于owncloud的私有云解决方案。如果只需要简单的使用nextcloud,最基本的部署环境只需要nginx(apache)+php即可。

记录一下在宝塔面板环境下搭建nextcloud的过程中出现的一些问题及解决。

=======更新========

Nextcloud 14.x版本后会出现一些新的警告,可以参照:

Nextcloud 16.x

一、部署

部署的过程不再详述,总结一下就是:

1.宝塔面板安装nginx+php7.2(注意nextcloud从13.0版本开始才支持php 7.2)

3.服务端解压并访问

4.填写安装信息(用户名、密码),如果只是简单使用,可直接使用SQLite作为数据库,不需要MySQL

二、发现问题

经过部署,nextcloud已经可以在web端或者客户端使用了,体验上来说,是没有任何影响的。但是从web端进入管理页面,会有如下错误

722910746f0b50e057343239875fcf68.gif

PHP 的设置似乎有问题, 无法获取系统环境变量. 使用 getenv(\”PATH\”) 测试时仅返回空结果.

Please check the installation documentation ↗ for PHP configuration notes and the PHP configuration of your server, especially when using php-fpm.

PHP 模块 ‘fileinfo’ 缺失. 我们强烈建议启用此模块以便在 MIME 类型检测时获得最准确的结果.

Your data directory and files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.

The “Strict-Transport-Security” HTTP header is not set to at least “15552000” seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips.

内存缓存未配置,为了提升使用体验,请尽量配置内存缓存。更多信息请参见文档。

The PHP OPcache is not properly configured. For better performance it is recommended to use the following settings in the php.ini:

opcache.enable=1

opcache.enable_cli=1

opcache.interned_strings_buffer=8

opcache.max_accelerated_files=10000

opcache.memory_consumption=128

opcache.save_comments=1

opca

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值