Discourse is a great free and open-source forum software.
There is an Linux installation guide with docker, but Discourse runs with a subdomain like discourse.example.com. I want Discourse run in a subfolder like example.com/forum.
There is a guide how to do this, but how to configure the nginx server to serve other content (example.com/index.html or example.com/otherContent) on the same machine?
- install discourse with docker on a linux server https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md
-
change the port of the docker container and setup SSL with Let’s Encrypt (don’t use the subdomain like discourse.example.com use example.com) https://www.digitalocean.com/community/tutorials/how-to-install-discourse-behind-nginx-on-ubuntu-14-04
-
create a folder for all the other content for your site
if necessary change the owner to you or www-data
This is the root folder for your domain example.com
Dont create a forum folder here, it will cause a conflict with the discourse docker redirect!
- change the
/etc/nginx/sites-enabled/discourse
to this and replace http://discourse.example.com with your url (use main url not subdomain)
- restart nginx
If you go to example.com/forum your Discourse site should appear and if you go to example.com you should see your index.html (if you created one).