502 Bad Gateway Strapi after delete content-type via /srv/strapi/strapi-development/api

Hello, I have strapi one-click app and I delete content-type in /srv/strapi/strapi-development/api and return 502 Bad Gateway. So I run “tail -f /var/log/nginx/*.log” and this is what I got:

[error] 32182#32182: *90 connect() failed (111: Connection refused) while connecting to upstream, client: 139.228.194.216, server: backend.itlf.net, request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:1337/favicon.ico", host: "www.backend.itlf.net", referrer: "https://www.backend.itlf.net/"

can you help me?

502 gateway errors typically come from the proxy service (such as nginx) and it means it’s unable to contact the backend service (Strapi).

I would suggest you check your server logs as it’s likely the Strapi application crashed with an internal error. If you are using the one-click, you can find documentation on how to access the Strapi service user and the pm2 logs: https://strapi.io/documentation/developer-docs/latest/installation/digitalocean-one-click.html#using-the-service-account