I investigated this a couple of month ago and wrote in my NetxCloud Install Instruction the following:
Nextcloud use by default the standart header ‘X-Forwarded-For’ so basically:
Add this directive in the proxy virtual host:
ProxyPreserveHost On
ProxyPass / http://192.168.1.63/
ProxyPassReverse / http://192.168.1.63/
And this in the file config.php of Nextcloud:
'forwarded_for_headers' => ['HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED'],
And today it work =)