This is the default nginx configuration for gancio, please modify at least «YOUR_DOMAIN». Note that it does not include HTTPS setup but you can easily use [certbot](https://certbot.eff.org/) for that.
Create the path where nginx will store cached contents
```bash
mkdir -p /var/cache/nginx/gancio
chown www-data: /var/cache/nginx/gancio
```
### Define the cache zone
Add the directive `proxy_cache_path` that will define the zone `gancio_cache` inside the http section, for example in the main configuration file `/etc/nginx/nginx.conf` or directly in `<your-config>` like in the example below.
-`keys_zone` this folder is accessible using the directive `proxy_cache gancio_cache` inside a server block and has max size of 1g = 1024megabyte
-`max_size`: each file has a max size of 80m (big but maybe tomorrow gancio could support gif or small videos as event images)
-`inactive` if a content initially cached is not requested again in a week, nginx removes it, otherwise the inactive time is reset since the last visit and that content will stay another week
If you run multiple gancio's instances on the same nginx (e.g. a `prod` and a `test` instance) consider using a different name for the `keys_zone` (by default 'gancio_cache'), and then modify accordingly the directive `proxy_cache` in the virtualhost file.
### Add the proxy_cache directive inside the server block