Having trouble with setting up NC behind nginx reverse proxy

Nextcloud version (eg, 20.0.6): 20.0.6
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache 2
PHP version (eg, 7.4): 7.4

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

The output of your Nextcloud conf


<?php
$CONFIG = array (
  'instanceid' => 'ocmwwaur54zl',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => 'mydomain.com',
    2 => '192.168.57.196'
  ),
   'trusted_proxies' => '192.168.57.224'
);

The output of your nginx nextcloud conf:

   server {
    server_name mydomain.com;
    set $upstream 192.168.57.196/nextcloud:80;

    location / {
    proxy_pass_header Authorization;
    proxy_pass http://$upstream;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_http_version 1.1;
    proxy_set_header Connection “”;
    proxy_buffering off;
    client_max_body_size 0;
    proxy_read_timeout 36000s;
    proxy_redirect off;
    }


    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/mydomain.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mydomain.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


}
    server {
    if ($host = mydomain.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

I’m having issues getting to my self hosted nextcloud through my proxy and I know it has something to do with how I’ve set up my nextcloud conf, I’m not sure it’s laid out right. I have no issues getting to my instance within my network via IP address. NC is running on a RPi4 on Debian installed the traditional way, no snap or docker, using NC, apache2, and php. My proxy is an atomic pi running ubuntu and nginx. Can someone point out whatever error I’m committing? Thanks.

Also let me add that my proxy is handling SSL and not the NC server. Also the Apache error message I get when accessing through the proxy is 404 not found