如果您在日志文件中看到无意义的消息,例如 ,请将此部分添加到 你的 nginx 配置来抑制它们:client denied by server configuration: /var/www/data/htaccesstest.txt
location = /data/htaccesstest.txt {
allow all;
log_not_found off;
access_log off;
}
请求头相关问题
vim /etc/nginx/conf.d/nextcloud.conf
在HTTPS配置块中增添以下内容
add_header Strict-Transport-Security max-age=15552000;
add_header Strict-Transport-Security ‘max-age=15552000’ always;
add_header Referrer-Policy “no-referrer” always;
add_header X-Content-Type-Options “nosniff” always;
add_header X-Frame-Options “SAMEORIGIN” always;
add_header X-Permitted-Cross-Domain-Policies “none” always;
add_header X-Robots-Tag “noindex, nofollow” always;
add_header X-XSS-Protection “1; mode=block” always;
重载nginx
systemctl reload nginx
缺失国际区号与默认地域
vim /var/www/nextcloud/config/config.php
添加如下语句
‘default_phone_region’ => ‘CN’,
‘default_language’ => ‘zh_CN’,
‘default_locale’ => ‘zh’,
不被信任的域名
vim /var/www/nextcloud/config/config.php
添加该域名即可
#受信任的域名
‘trusted_domains’ =>
array (
0 => ‘10.0.0.2’,
1 => ‘10.1.1.20’,
2 => ‘nc6.example.com’,
3 => ‘hnc6.example.com’,
4 => ‘nc4.example.com’,
),
您的网页服务器未正确设置以解析“/.well-known/**”
编辑nginx配置文件,修改well-know相关
location ^~ /.well-known {
location = /.well-known/webfinger { return 301 s c h e m e : / / scheme:// scheme: