# How to upload files in root directory?

**URL:** https://meta.discourse.org/t/how-to-upload-files-in-root-directory/48388
**Category:** Support
**Created:** [2016年八月9日 10:17 UTC](https://meta.discourse.org/t/how-to-upload-files-in-root-directory/48388 "2016-08-09T10:17:04Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![iamntz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamntz/32/114670_2.png) [@iamntz](https://meta.discourse.org/u/iamntz)
#### Post date: [2017年二月16日 17:06 UTC](https://meta.discourse.org/t/how-to-upload-files-in-root-directory/48388/8 "2017-02-16T17:06:50Z")

</div>

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](https://meta.discourse.org/t/running-other-websites-on-the-same-machine-as-discourse/17247).

- `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:

```plaintext
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.

* * *

> [@Falco](#):
>
> Discourse have a plugin to get push notifications already:

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.

---

_[View the full topic](https://meta.discourse.org/t/how-to-upload-files-in-root-directory/48388)._
