Install Discourse on a droplet with WordPress served by Apache?

AI-generated summary

BlackBelt35 is having trouble installing Discourse on a DigitalOcean droplet with WordPress and Apache already installed. They need Discourse to be on the same droplet as WordPress to share the database with a custom social network app and to use a JSON add-on installed on the WordPress instance.

itsbhanusharma questioned why Discourse’s API can’t be used if it’s hosted on a separate node, but BlackBelt35 prefers not to multiply droplets due to the monthly cost.

BlackBelt35 found a tutorial for setting up Discourse on a server with existing Apache sites, but it lacks details on certain steps. justin suggested a guide from Meta Discourse, which can be adapted for Apache, but requires researching how to handle virtual hosts. itsbhanusharma noted that Apache can sometimes cause trouble with the message bus, which justin acknowledged as a potential issue.

Hello everyone ! :slight_smile:
I’m really puzzled by a little problem with my personnal website project :
I can’t manage to install any Discourse instance on my DigitalOcean droplet, with already WordPress and Apache installed.

For example, this thread is for installing WordPress on a droplet with Discourse. But I need the reverse : Need help with installing Discourse and Wordpress | DigitalOcean

And this one is for installing Discourse on a droplet / server with WordPress served by Nginx. But my WordPress is served by Apache : https://blog.khophi.co/install-run-discourse-behind-nginx-right-way-first-time/

So it doesn’t fit to my situation.

The manipulations are probably 95% similar between Apache and Nginx, but I don’t want to do any mistake.

I could use a separate droplet for Discourse, but I need to use Discourse’s API to share its database with a custom social network app, created by the main programmer of my project. And it also uses a JSON add-on installed on the WordPress instance.

So it will be way simplier if I can install all that stuff on the same droplet. Without any conflicts.

  • Apache is listening to port 80.

  • My droplet uses Ubuntu 18.04.

  • Discourse will be installed on a subdomain : forum.example.com. DNS records are already done.

Any tips or suggestions are welcome ! :slight_smile:

What bars you from using discourse api if it is hosted on a separate node?

Of course, there is probably a solution to use Discourse’s API between two separates instances. But this isn’t my main concern today.

And I don’t want to multiply droplets, each one has a substantionnal monthly cost.

This tutorial looks to be a good beginning, but there are some big lacks at several steps. How to edit app.yml, how to change listening port on Apache… It is really too synthetic : Set up Discourse on a server with existing Apache sites

Any ideas ? Someone knows a more detailled tutorial ?

Check out this guide! It can be done with Apache too but you’ll need to research how to handle the virtual hosts.

It’s not just about vhosts … Apache also sometimes causes trouble with message bus

That’s good to know — I wasn’t aware of the trickiness on that as I primarily run nginx.