Configure nginx
How to make additional configuration changes to nginx.
Last updated
How to make additional configuration changes to nginx.
Last updated
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.
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
.
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.
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:
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:
See Dokku's documentation on for more details.