Merge pull request #68 from seeafish/master
Fixing vhosts.j2 indentation
This commit is contained in:
commit
a6ed2a9cc6
15
README.md
15
README.md
|
@ -28,15 +28,18 @@ A list of vhost definitions (server blocks) for Nginx virtual hosts. If left emp
|
||||||
error_log: ""
|
error_log: ""
|
||||||
extra_parameters: |
|
extra_parameters: |
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
}
|
}
|
||||||
|
|
||||||
An example of a fully-populated nginx_vhosts entry, using a `|` to declare a block of syntax for the `extra_parameters`.
|
An example of a fully-populated nginx_vhosts entry, using a `|` to declare a block of syntax for the `extra_parameters`.
|
||||||
|
|
||||||
|
Please take note of the indentation in the above block. The first line should be a normal 2-space indent, with everything else 4-space indented, relative to the first line.
|
||||||
|
Following this style will ensure the config file is indented correctly.
|
||||||
|
|
||||||
nginx_remove_default_vhost: false
|
nginx_remove_default_vhost: false
|
||||||
|
|
||||||
Whether to remove the 'default' virtualhost configuration supplied by Nginx. Useful if you want the base `/` URL to be directed at one of your own virtual hosts configured in a separate .conf file.
|
Whether to remove the 'default' virtualhost configuration supplied by Nginx. Useful if you want the base `/` URL to be directed at one of your own virtual hosts configured in a separate .conf file.
|
||||||
|
|
|
@ -2,32 +2,32 @@
|
||||||
server {
|
server {
|
||||||
listen {{ vhost.listen | default('80 default_server') }};
|
listen {{ vhost.listen | default('80 default_server') }};
|
||||||
|
|
||||||
{% if vhost.server_name is defined %}
|
{% if vhost.server_name is defined %}
|
||||||
server_name {{ vhost.server_name }};
|
server_name {{ vhost.server_name }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if vhost.root is defined %}
|
{% if vhost.root is defined %}
|
||||||
root {{ vhost.root }};
|
root {{ vhost.root }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
index {{ vhost.index | default('index.html index.htm') }};
|
index {{ vhost.index | default('index.html index.htm') }};
|
||||||
|
|
||||||
{% if vhost.error_page is defined %}
|
{% if vhost.error_page is defined %}
|
||||||
error_page {{ vhost.error_page }};
|
error_page {{ vhost.error_page }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if vhost.access_log is defined %}
|
{% if vhost.access_log is defined %}
|
||||||
access_log {{ vhost.access_log }};
|
access_log {{ vhost.access_log }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if vhost.error_log is defined %}
|
{% if vhost.error_log is defined %}
|
||||||
error_log {{ vhost.error_log }} error;
|
error_log {{ vhost.error_log }} error;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if vhost.return is defined %}
|
{% if vhost.return is defined %}
|
||||||
return {{ vhost.return }};
|
return {{ vhost.return }};
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if vhost.extra_parameters is defined %}
|
{% if vhost.extra_parameters is defined %}
|
||||||
{{ vhost.extra_parameters }}
|
{{ vhost.extra_parameters }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue