How to make Discourse coexist with nginx on a Debian 9 server?

Hi!

I’m a noob when it comes to setting up servers, so please forgive my ignorance, I’m trying to learn. I’ve been using Linux for a decade for media production, but setting up web services is a different beast apparently.

I’ve installed Discourse on my server running Debian 9. Later I installed nginx to put a simple website there, which will later provide visitors with a link to a subdomain hosting the Discourse server.

I’ve temporarily renamed /var/discourse to /var/_discourse and after a reboot nginx works. before it seemed that Discourse has hijacked the server’s http port.

However I’m still wondering how to make the two work together later.
I’ll probably want to put a main landing page on my domain and put the Discourse on a subdomain there.

I’d be grateful for any help with this.

I guess I could point nginx to a directory with Discourse’s index.html and make it expose that on a subdomain, right?

How do I make the two work together?

1 Like

This article shall answer all your questions:

4 Likes

Thanks!
I’ve just updated my initial post, I’ll check this link out.

1 Like

Your solution is to actually break Discourse directory structure to prevent it from starting up.

You could simply stop it through
./launcher stop app

3 Likes