首页 生活随笔

Nextcloud旧版升级到新版有时候会报错webfinger和nodeinfo规则配置不太对。
网上很多教程都是错的,试了很久试出个对的,记录一下。
找到Nextcloud的配置目录:config/nginx/site-confs
vi打开nginx配置default,配置伪静态规则

location = /.well-known/carddav {
  return 301 https://网盘域名:443/remote.php/dav;
}
location = /.well-known/caldav {
  return 301 https://网盘域名:443/remote.php/dav;
}
location = /.well-known/host-meta {
  return 301 https://网盘域名:443/public.php?service=host-meta;
}
location = /.well-known/host-meta.json {
  return 301 https://网盘域名:443/public.php?service=host-meta-json;
}
    location = /.well-known/webfinger {
  return 301 https://网盘域名:443/index.php/.well-known/webfinger;
}
    location = /.well-known/nodeinfo {
  return 301 https://网盘域名:443/index.php/.well-known/nodeinfo;
}

保存重启nginx刷新页面即可
QQ截图20210818095709.jpg




文章评论