For anyone else that is using apache to host nextcloud on one server, and another server running caddy reverse proxy here was my answer:
The answer was in the URL in the vhost file. Since i had moved an instance that was a standalone vm to behind a reverse proxy, the vhost file needed changed. I change the *:8080 to files.internal.site:8080 and the redirects in the vhost file to use that internal domain.
Add the reverse proxy entries Next cloud calls for in the config.php. I needed
‘overwrite.cli.url’, ‘overwritehost’ => files.mycompany.com, and trusted_proxies array (use the trusted_domains array as an example if you need one. I simply added the proxy host internal Ip.
the last problem i had is apache was ignoring the .htaccess file. That’s because in ubuntu 22.04 lts it loads the apache2.conf file first and the directory entry for /var/www has allow override none. Changing it to allow overrides for just that entry fixed my last issue.
It started working. the end.