After nginx & certbot configuration I can't access strapi through https://domain.com:1337 but i can through http://[DigitalOcean IP]:1337

If you are using nginx, then port 1337 should not be publicly accessible, it should only be internal to the server and nginx proxies all the requests.

What should happen:

  • User => Makes request to api.example.com on port 443 => received by nginx on port 443 => proxies request to localhost on port 1337 inside the server => Strapi gets request on localhost port 1337

What you are doing:

  • User => Makes request to api.example.com on port 1337 => Strapi gets request on your server’s IP on port 1337