How to run discourse on subdirectory of external domain?

You are going on a wrong path by trying to list every single route in your nginx file. That will never work.

First install discourse in a server following Subfolder support with Docker. Use an internal domain for this, so the configuration works. You will also need to remove ssl templates from app.yml.

Then, in the server where you control the actual domain, add a single location block with the subfolder and use the necessary proxy directives to send traffic to the server where discourse is located.

5 Likes