Install Discourse on a droplet with WordPress served by Apache?

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 : Install and Run Discourse behind Nginx the Right Way, First Time! - KhoPhi's Blog

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?

1 Like

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 : How to set up Discourse on a server with existing Apache sites

Any ideas ? Someone knows a more detailled tutorial ?

1 Like

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

3 Likes

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

2 Likes

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

2 Likes