Merge pull request #1302 from econya/master

in nginx doc, mention where original templates are found by default.
This commit is contained in:
Jose Diaz-Gonzalez
2015-07-10 10:28:15 -04:00

View File

@@ -56,7 +56,7 @@ This archive should is expanded via `tar xvf`. It should contain `server.crt` an
> New as of 0.3.10
Dokku currently templates out an nginx configuration that is included in the `nginx-vhosts` plugin. If you'd like to provide a custom template for your application, you should copy the existing template - ssl or non-ssl - into your `$DOKKU_ROOT/$APP` directory at the file `nginx.conf.template`.
Dokku currently templates out an nginx configuration that is included in the `nginx-vhosts` plugin. If you'd like to provide a custom template for your application, you should copy the existing template - ssl or non-ssl - into your `$DOKKU_ROOT/$APP` directory at the file `nginx.conf.template`. If you followed the default installation path, the original templates are found in `/var/lib/dokku/plugins/nginx-vhosts/templates/nginx{.ssl,}.conf.template` .
For instance - assuming defaults - to customize the nginx template in use for the `myapp` application, create a file at `/home/dokku/myapp/nginx.conf.template` with the following contents:
@@ -94,6 +94,8 @@ A few tips for custom nginx templates:
- Templated files will be validated via `nginx -t`.
- Application environment variables can be used within your nginx configuration.
After your changes a `dokku deploy myapp` will regenerate the `/home/dokku/myapp/nginx.conf` file which is then used.
## Customizing hostnames
Applications typically have the following structure for their hostname: