Skip to content

Commit

Permalink
PR #36 follow-up: clean up and reformat docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Dec 28, 2015
1 parent a8620b9 commit 9848800
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""

Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- include: setup-Debian.yml
when: ansible_os_family == 'Debian'

# Vhost configuration
# Vhost configuration.
- include: vhosts.yml

# Nginx setup.
Expand Down
2 changes: 1 addition & 1 deletion templates/nginx.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ http {
{% endif %}

{% if nginx_extra_options %}
{{ nginx_extra_options }}
{{ nginx_extra_options }}
{% endif %}

{% for upstream in nginx_upstreams %}
Expand Down

0 comments on commit 9848800

Please sign in to comment.