I don’t really understand the point behind complicating things by mixing and matching different examples.
Let me try to break it down as simple as I can.
- Discourse won’t run well behind apache. I’ve tried it in past and it is terrible.
- Two webservers can’t be made to run together on same machine so No, You can not make it so that apache2 handles wordpress and nginx handles discourse.
- You may want to start a 2nd server in case you can’t figure out how to migrate your wordpress from apache2 to nginx
- You don’t have to open custom ports for discourse to work as it is talking to nginx over unix sockets by the way that you have configured it. opening more ports is of no use.
now, Coming to the solution part:
If you really love httpd (apache2) you can make it run on port 81 or any other port and then configure nginx to proxy back your wordpress domain’s requests to that port.
If you don’t care what webserver serves your wordpress and just need it to work, take a backup of wordpress, announce a downtime and remove apache & php, configure php-fpm and that should do the trick for you.
if you don’t understand what the heck I’m talking about, better choice will be to spin up a new server and move your discourse or wordpress to that.