If you see this page, the nginx web server is successfully installed and working. Further configuration is required.
The site becomes accessible along the path from the config
/etc/nginx/sites-enabled/*;
with basic settings, if I replace them with my own, the site becomes inaccessible
And I must give from mine
/etc/nginx/conf.d/*.conf;
It produced this output:
My web server is (include version):
nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 22.04 (LTS) x64
My hosting provider, if applicable, is:
digitalocean
I can login to a root shell on my machine (yes or no, or I don't know):
yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
*no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
I think this means the host you are running docker on already has something on port 443 (e.g. a web server) so docker can't bind to that for your container services.
[Your question is perhaps better suited to stackoverflow, at least to get the answers you need, it's not yet anything to do with Let's Encrypt]
You can't run two services on the same port. If it's a freshly installed server and you are NOT using or planing to use nginx for anything (it came preinstalled?), you can just uninstall it. If you ARE using nginx for something else, then you probably can install the other service on a different port and configure nginx as a reverse proxy for it.
This means nginx is looking for the certificate file and can't find it. I'm not an nginx expert but I'd suggest removing the https configuration (the listen on port 443 and pointers to the certificate files) then try it all again.
Alternatively if you're not an nginx expert either, try out Caddy (caddyserver.com) instead as it has automatic https.