Can't get nginx to display YaCy on domain

Completed:
–Certbot
–Nginx homepage
–YaCy settings to the domain
–Nginx config below
–systemctl reload nginx

What do I gotta do to make it show up on the domain??

server {
        server_name mydomain.com;
        access_log /var/log/nginx/search-access.log;
        error_log /var/log/nginx/search-error.log;

        location / {
                proxy_pass http://127.0.0.1:8090;
                proxy_set_header Host $host;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Real-IP $remote_addr;
        }
}

Here is my configuration:

upstream yacybackend {
  server 127.0.0.1:8090;
  server 127.0.0.1:8091 backup;
}
server {
  server_name mydomain.com;
  location / {
    proxy_pass http://yacybackend;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
  }
}

This config is essentially the same as yours and has only additional the backup config. So far this looks good.

I would suggest to check the nginx log in /var/log/nginx

I got around the issue using Yunohost, and it worked for awhile. But now when I try to crawl it displays:

504 Gateway Time-out
nginx

As posted on this thread: Yacy crashes on crawl

solved this issue with systemctl restart
But unclear why it happened