宝塔linux面板假设nextcloud,宝塔面板部署NextCloud(14.0.3)逐一解决后台安全及设置警告...
剛剛把NextCloud更新到14.0.3,后臺又出現了一堆警告,也是夠煩的。
之前寫過 寶塔面板部署NextCloud逐一解決后臺安全及設置警告,那個是基于Nextcloud 13.x的,所以就再補充記錄一下解決如下的警告。
Use of the the built in php mailer is no longer supported. Please update your email server settings
您的網頁服務器未正確設置以解析“/.well-known/caldav”
您的網頁服務器未正確設置以解析“/.well-known/carddav”
The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
在數據表 “oc_share” 中無法找到索引 “parent_index” .
在數據表 “oc_filecache” 中無法找到索引 “fs_mtime” .
HTTP的請求頭 “Referrer-Policy” 未設置為 “no-referrer”, “no-referrer-when-downgrade”, “strict-origin” or “strict-origin-when-cross-origin”. 這會導致信息泄露. 請查閱 W3C 建議
1.Use of the the built in php mailer is no longer supported. Please update your email server settings
大意就是php自帶的mail組件不再被nextcloud支持,需要使用smtp方式發送郵件。
其實就是讓你設置一個smtp服務器信息,便于發送郵件,關于SMTP這里不再詳述。
2.您的網頁服務器未正確設置以解析“/.well-known/caldav”及您的網頁服務器未正確設置以解析“/.well-known/carddav”
這兩個警告可以一起解決,出現該提示一般是因為這兩個路徑的偽靜態設置有問題,導致無法正常訪問。
解決方法就是添加兩行重定向配置
rewrite /.well-known/carddav /remote.php/dav permanent;
rewrite /.well-known/caldav /remote.php/dav permanent;
3.The database is missing some indexes. Due to the fact that adding indexes on big tables could take some time they were not added automatically. By running “occ db:add-missing-indices” those missing indexes could be added manually while the instance keeps running. Once the indexes are added queries to those tables are usually much faster.
在數據表”oc_share” 中無法找到索引”parent_index”
在數據表”oc_filecache” 中無法找到索引”fs_mtime”
大意是說,數據庫的一些索引丟失了,需要使用OCC修復一下。OCC是owncloud的命令行,而nextcloud又是基于owncloud開發的,所以需要用到OCC來修復丟失的數據庫索引。
修復命令為:
php occ db:add-missing-indices
SSH進入服務器nextcloud的根目錄,并執行修復命令
出現如下錯誤
Console has to be executed with the user that owns the file config/config.php
Current user: root
Owner of config.php: www
Try adding ‘sudo -u www ‘ to the beginning of the command (without the single quotes)
好吧,需要使用www用戶權限來修改,再次執行
sudo -u www php occ db:add-missing-indices
修復成功!
4.HTTP的請求頭 “Referrer-Policy” 未設置為 “no-referrer”, “no-referrer-when-downgrade”, “strict-origin” or “strict-origin-when-cross-origin”. 這會導致信息泄露
大意是,需要設置一個Referrer-Policy請求頭來提高安全性。Nginx配置文件里添加:
add_header Referrer-Policy "no-referrer";
======================================================
至此,Nextcloud升級到14.0.3后出現的一些新的警告提示已全部消滅干凈
總結
以上是生活随笔為你收集整理的宝塔linux面板假设nextcloud,宝塔面板部署NextCloud(14.0.3)逐一解决后台安全及设置警告...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux 文档属于apache,Apa
- 下一篇: c语言中英文的作用,C语言中英文对照.d