Remote access doesn't work with nginx reverse proxy

Hello,
I’m trying to get remote access to Home Assistant witch is on VMware EXSI with nginx using reverse proxy. I’m able to type my login but when i validate it, i got this page :

Imgur
If i click on retry i back to the login screen.

Here my nginx reverse proxy conf

server {
    server_name ***;
    access_log off;


if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}


location / {
    proxy_pass http://192.168.0.207:8123/;
    proxy_cache_valid 12h;
    expires 12h;
    proxy_cache_use_stale error timeout invalid_header updating;
}


error_page 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 500 501 502 503 504 505 506 507 /error.html;

location = /error.html {
    root /var/www/nginx-default;
}

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/***/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/***/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 = ***) {
        return 301 https://$host$request_uri;
    } # managed by Certbot



    listen 80;
    server_name ***;
    return 404; # managed by Certbot


}

Here configuration.yaml

http:
  server_port: 8123
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.0.2

System Health

arch x86_64
chassis vm
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.15
installation_type Home Assistant OS
os_name Linux
os_version 5.4.72
python_version 3.8.6
supervisor 2020.11.0
timezone Europe/Paris
version 0.117.5
virtualenv false

If you have some leads, to clear my mind.

Thanks

Try the nginx config for HA at link

Also, look at HA and nginx logs. This will help you determine what is happening and possibly why if changing nginx config not help

Thanks you, i tried this and modify for my use. It’s working