Hm, not good. Your configuration is probably too specific to debug this remotely, so here is some more general advice:
- You absolutely must configure your nginx to only route
/forum/traffic to Discourse, or it will – surpsrise – route all traffic to Discourse. - Because you followed the subfolder tutorial, Discourse now expects all requests to go to
/forum/somewhere. Therefore, the outer nginx must not strip the/forumfrom the request, or Discourse will rightfully respond with404errors. - You can configure nginx to create quite extensive logs, which is key when debugging complex configurations

Also, your proxy_pass directive above looks fishy: nginx should speak HTTP to Discourse, not HTTPS.