WARNING: Port 443 of computer does not appear to be accessible using hostname

I advise to put a reverse proxy in your server facing the internet, and make the reverse proxy redirect to Wordpress or Discourse depending on the host.

For example, run a nginx service using ports 80 and 443 in the host, and make it proxy the requests to blog.yourdomain to the Wordpress service (either an internal port on your host, if it’s Apache + Wordpress, in which case you could redirect to the apache port, like 8080, or using fastcgi).

Then in the same server you can run Discourse, making sure to replace the ports in app.yml to unused ports on the host, like 8081, or use a unix socket as @neounix said, then proxy the requests to forum.yourdomain to that port, or to the socket. To run discourse you will need to execute ./launch rebuild app in the discourse directory (should be /var/discourse)

In this case you wouldn’t run the discourse-setup to create a 2GB swapfile (mainly used for upgrades, that may require more memory, although you may not need it if your server has a lot of memory) and create the app.yml file. Instead, you should do that yourself. If you don’t know what to put in the app.yml file, I recommend running the recommended install in a separate server, even if only to be more familiar with Discourse, and to see the generated app.yml, that you could use in your shared server (remembering to change the ports or remove them if you use the socket approach).

I advise to follow one of the howto topics about it, if you can’t proceed forward.