You want to switch from a subdomain (abcd.example.com) to a subfolder (example.com/abcd).
Basic steps:
Change config.json to reflect the new url
"url": "http://forum.example.com" -> "url": "http://example.com/forum"
Use nginx to reverse proxy requests by adding a new location block for /forum