在config.php加入:
'trusted_proxies' => ['容器地址'],
'overwritehost' => '反代域名:端口',
'overwriteprotocol' => 'https',
在swag的nextcloud.subdomain.conf加入:
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
我是这么解决的。