Running other websites on the same machine as Discourse

You will have to make changes by hand to make it work behind the reverse proxy. Assuming that you know how to do that and do it after you create the app.yml with
This might work:

./launcher destroy app
mv containers/app.yml first_app.yml
./launcher rebuild first_app
./discourse-setup

Then you’d edit app.yml to be behind the reverse proxy.

2 Likes

Getting mixed content warnings when discourse is listening on a unix socket. Fresh install.

1 Like

If I remember correctly, that’s the cached logo (I assume you have enabled the force https parameter). Could you check it in the browser dev tool/network tab?

2 Likes

Kindly mark this as resolved. I had to force https setting and (also do a rake search replace to add the subdirectory path). The main is running Apache along with many other sites. For this one example.org we have WordPress installed and doing Apache reverse proxy for /forums with Discourse listening at a websocket.

2 Likes

Instead of @riking’s method at the top?
Do you have a link to a walkthrough on how to do it the “double NGNIX” way?
Sadly, I know nothing of NGINX, but the walk through by @riking seems simple enough, but if there’s a better way, I’d appreciate the details on that.

1 Like

Hi there!
We installed Discourse through cloning files from the Git repository and did what you suggested; but we handled the SSL protocol using Nginx proxy manager (We commented out the port 443 exposing part in app.yml ).
We are using portainer v2.11.0 in which we can see the Discourse container that is successfully created but we cannot run the website and receive a 502 bad gateway error.

Any idea how we can fix the error?

1 Like

Did you also remove the ssl and lets encrypt certificates?

1 Like

See:


Do you use socket install like this:

Then see: How to debug a sub-folder Discourse install

Wouldn’t it be reasonable to configure the outside proxy to connect to Discourse directly rather than to the Nginx proxy within the container (having everything double-proxied)? Or does the internal Nginx proxy serve an important task which an outside proxy cannot handle?

Hello, what can I do if there’s no nginx.sock file?

❯ ls /var/discourse/shared/standalone/
backups  postgres_backup  postgres_run  state  uploads
log      postgres_data    redis_data    tmp

Did you include the template?

2 Likes