From d4ea8520ac3c9e90238e75866906a5d834539129 Mon Sep 17 00:00:00 2001 From: Felix Wolfsteller Date: Thu, 16 Jul 2015 11:50:45 +0200 Subject: [PATCH 1/2] In doc: mention alternative to nginx.conf templates: include-dir. --- docs/nginx.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/nginx.md b/docs/nginx.md index 154dc3635..dac115aea 100644 --- a/docs/nginx.md +++ b/docs/nginx.md @@ -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: From 430bd3f01a6d757baafcb7f3025bae35b8a01c06 Mon Sep 17 00:00:00 2001 From: Felix Wolfsteller Date: Wed, 22 Jul 2015 07:41:22 +0200 Subject: [PATCH 2/2] Fix typo and remove reference to dokku-alt issue. --- docs/nginx.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/nginx.md b/docs/nginx.md index dac115aea..7b938b06e 100644 --- a/docs/nginx.md +++ b/docs/nginx.md @@ -102,15 +102,13 @@ The default nginx.conf- templates will include everything from your apps `nginx. 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 +. That means you can put additional configuration in separate files, for example to limit the uploaded body size to 50 megabytes, 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: