The simplest thing to do is run discourse on its own domain like forum.example.com.
If you don’t want simple, try this