Instalei o Discourse no Digital Ocean, mas agora não consigo instalar o nginx?

So one thing I see right away is that you have no proxy_pass directives in your complete config. Normally, you’d use that directive in the http blocks to say “Okay, request, I’m going to handle you because you’re port 80 and server_name forums.example.com and I’m going to proxy you to my Discourse app which is running on port 81 on my server”. The Discourse app must not be port 80 because the NGINX process on the DigitalOcean droplet is already bound to port 80. But NGINX is capable of proxying that request on port 80 through a new request to localhost:81. It can do that to get to your Discourse app.

So if you’re running all of this as processes on the droplet with nothing else like Docker containers involved, you should have a line somewhere in your config that looks like proxy_pass http://localhost:81; (or whichever port you’re using for Discourse). For your other “app” which is really just a set of files you want NGINX to statically serve, you can use that try_files directive I already see in your configuration.

I’d suggest reading through a few examples that involve proxying to see what you can do. You may have a setup that is in a weird state that isn’t clear to any of us, since apparently without any proxying in your NGINX config, which would be necessary for www.EXAMPLE.com to show your Discourse app in a web browser, it’s still reachable by a web browser anyways.

1 curtida