Setting up Discourse on a VPS with other sites

There’s a (in my opinion) slightly easier alternative:

  1. Configure your Apache to listen on a different port.
  2. Set up nginx as a reverse proxy as described above.
  3. Set up nginx to proxy the non-Discourse traffic to Apache’s port.

Note that if you want HTTPS (and you do want that), in that case, you’ll have to set this up in nginx.