> For the complete documentation index, see [llms.txt](https://liieditors.docs.laws.africa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://liieditors.docs.laws.africa/system-management/configure-nginx.md).

# Configure nginx

The website uses nginx as a reverse proxy. This means that requests from the Internet are served by nginx, which forwards them to Django, and then returns the response to the user.

## Config file location

Dokku places a single config file into the main nginx config directory at `/etc/nginx/conf.d/dokku.conf`.

That file loads individual config files for each dokku app.

The nginx configuration used for the website is stored at  `/home/dokku/APP/nginx.conf`.

## Additional config files

The app's main nginx configuration file dynamically includes the files  `/home/dokku/APP/nginx.conf.d/*.conf` .  These files are included as part of the `server` nginx configuration block.&#x20;

You can put additional files into this directory to customise the nginx configuration. Once you have added a file or made changes, you must tell nginx to reload its configuration.

First, ask nginx to test that the configuration is valid:

```
sudo service nginx configtest
```

If that shows an error, look at the log output in `/var/log/nginx/error.log` for more details.

If nginx is happy with the changes, tell it to re-load its configuration:

```
sudo service nginx reload
```

## Further reading

See Dokku's documentation on [Nginx Proxy Configuration](https://dokku.com/docs/networking/proxies/nginx/) for more details.
