How to upload files in root directory?

Hey guys, a bit late at the party, but here is how I solved this:

  1. First step is to make your server to run nginx behind a proxy. You can find this right here.
  • mkdir -p /var/www/discourse-static
  1. On the nginx config file (/etc/nginx/sites-enabled/discourse.conf), just after location / {} block, add the following:
location ~ (file1.txt|file2.json|file3.zip) {
  root /var/www/discourse-static;
}

Save and check the config by running nginx -T. If everything is fine (i.e. a wall of text will quickly scroll), then you can go on and sudo service nginx restart.

And that’s all.


Discourse push plugin is a bit limited and requires users to actually know where to look and what to look for in order to enable notifications.

4 Likes