From 984880098266ef2b7c34686a46fa94f30ba66856 Mon Sep 17 00:00:00 2001 From: Jeff Geerling Date: Mon, 28 Dec 2015 09:57:11 -0600 Subject: [PATCH] PR #36 follow-up: clean up and reformat docs. --- README.md | 5 +++-- defaults/main.yml | 4 ++-- tasks/main.yml | 2 +- templates/nginx.conf.j2 | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f0026e9..dfbbeb1 100644 --- a/README.md +++ b/README.md @@ -79,14 +79,15 @@ This value determines the largest file upload possible, as uploads are passed th Set as the `proxy_cache_path` directive in the `nginx.conf` file. By default, this will not be configured (if left as an empty string), but if you wish to use Nginx as a reverse proxy, you can set this to a valid value (e.g. `"/var/cache/nginx keys_zone=cache:32m"`) to use Nginx's cache (further proxy configuration can be done in individual server configurations). nginx_extra_options: "" -Optionally define extra parameters and their values to be insterted in the top-level `http` block in `nginx.conf`. The value should be defined literally (as you would insert it directly in the `nginx.conf`, adhering to the Nginx configuration syntax - such as `;` for line termination, etc.), like so: + +Extra lines to be inserted in the top-level `http` block in `nginx.conf`. The value should be defined literally (as you would insert it directly in the `nginx.conf`, adhering to the Nginx configuration syntax - such as `;` for line termination, etc.), for example: nginx_extra_options: | proxy_buffering off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header Host $http_host; + proxy_set_header Host $http_host; nginx_default_release: "" diff --git a/defaults/main.yml b/defaults/main.yml index 20fe724..e383993 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -20,13 +20,13 @@ nginx_client_max_body_size: "64m" nginx_proxy_cache_path: "" nginx_extra_options: "" -# Example extra options +# Example extra options, printed inside the main server http config: # nginx_extra_options: | # proxy_buffering off; # proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Scheme $scheme; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; -# proxy_set_header Host $http_host; +# proxy_set_header Host $http_host; nginx_remove_default_vhost: false nginx_vhosts: [] diff --git a/tasks/main.yml b/tasks/main.yml index bdc3f00..4822ec6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,7 +15,7 @@ - include: setup-Debian.yml when: ansible_os_family == 'Debian' -# Vhost configuration +# Vhost configuration. - include: vhosts.yml # Nginx setup. diff --git a/templates/nginx.conf.j2 b/templates/nginx.conf.j2 index 35d66a3..a4cead9 100644 --- a/templates/nginx.conf.j2 +++ b/templates/nginx.conf.j2 @@ -37,7 +37,7 @@ http { {% endif %} {% if nginx_extra_options %} - {{ nginx_extra_options }} + {{ nginx_extra_options }} {% endif %} {% for upstream in nginx_upstreams %}