PR #36 follow-up: clean up and reformat docs.

pull/40/head
Jeff Geerling 8 years ago
parent a8620b9b32
commit 9848800982
  1. 5
      README.md
  2. 4
      defaults/main.yml
  3. 2
      tasks/main.yml
  4. 2
      templates/nginx.conf.j2

@ -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). 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: "" 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: | nginx_extra_options: |
proxy_buffering off; proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme; proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 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: "" nginx_default_release: ""

@ -20,13 +20,13 @@ nginx_client_max_body_size: "64m"
nginx_proxy_cache_path: "" nginx_proxy_cache_path: ""
nginx_extra_options: "" nginx_extra_options: ""
# Example extra options # Example extra options, printed inside the main server http config:
# nginx_extra_options: | # nginx_extra_options: |
# proxy_buffering off; # proxy_buffering off;
# proxy_set_header X-Real-IP $remote_addr; # proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Scheme $scheme; # proxy_set_header X-Scheme $scheme;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # 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_remove_default_vhost: false
nginx_vhosts: [] nginx_vhosts: []

@ -15,7 +15,7 @@
- include: setup-Debian.yml - include: setup-Debian.yml
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
# Vhost configuration # Vhost configuration.
- include: vhosts.yml - include: vhosts.yml
# Nginx setup. # Nginx setup.

@ -37,7 +37,7 @@ http {
{% endif %} {% endif %}
{% if nginx_extra_options %} {% if nginx_extra_options %}
{{ nginx_extra_options }} {{ nginx_extra_options }}
{% endif %} {% endif %}
{% for upstream in nginx_upstreams %} {% for upstream in nginx_upstreams %}