Discourse.domain.com instellen met de hoofdwebsite op domain.com

They should resolve to two different IP’s

Root to the IP of the Apache server
forum. sub-domain to the IP of your Discourse server