Przeglądaj źródła

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

Jeff Geerling 9 lat temu
rodzic
commit
9848800982
4 zmienionych plików z 7 dodań i 6 usunięć
  1. 3 2
      README.md
  2. 2 2
      defaults/main.yml
  3. 1 1
      tasks/main.yml
  4. 1 1
      templates/nginx.conf.j2

+ 3 - 2
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: ""
 

+ 2 - 2
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: []

+ 1 - 1
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.

+ 1 - 1
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 %}