In doc: mention alternative to nginx.conf templates: include-dir.

This commit is contained in:
Felix Wolfsteller
2015-07-16 11:50:45 +02:00
parent f68b126bc9
commit d4ea8520ac

View File

@@ -96,6 +96,21 @@ A few tips for custom nginx templates:
After your changes a `dokku deploy myapp` will regenerate the `/home/dokku/myapp/nginx.conf` file which is then used.
### Customizing via configuration files included by the default templates
The default nginx.conf- templates will include everything from your apps `nginx.conf.d/` subdirectory in the main `server {}` block (see above):
include $DOKKU_ROOT/$APP/nginx.conf.d/*.conf;
. That means you can put additional configuration in separate files, for example to limit the uploaded body size to 50 megabyte, do
mkdir /home/dokku/myapp/nginx.conf.d/
echo 'client_max_body_size 50M;' > /home/dokku/myapp/nginx.conf.d/upload.conf
chown dokku:dokku /home/dokku/myapp/nginx.conf.d/upload.conf
service nginx reload
(taken from https://github.com/dokku-alt/dokku-alt/issues/195#issuecomment-75092205).
## Customizing hostnames
Applications typically have the following structure for their hostname: