Merge pull request #38 from opdavies/vhost-add-error-log

Add an additional parameter for error_log within virtual hosts
pull/40/head
Jeff Geerling 8 years ago
commit 6ae418802b
  1. 1
      README.md
  2. 1
      defaults/main.yml
  3. 3
      templates/vhosts.j2

@ -25,6 +25,7 @@ A list of vhost definitions (server blocks) for Nginx virtual hosts. If left emp
index: "index.php index.html index.htm"
error_page: ""
access_log: ""
error_log: ""
extra_parameters: |
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;

@ -30,6 +30,7 @@ nginx_vhosts: []
# # Properties that are only added if defined:
# error_page: ""
# access_log: ""
# error_log: ""
# extra_parameters: "" # Can be used to add extra config blocks (multiline).
nginx_upstreams: []

@ -12,6 +12,9 @@ server {
{% if vhost.access_log is defined %}
access_log {{ vhost.access_log }};
{% endif %}
{% if vhost.error_log is defined %}
error_log {{ vhost.error_log }} error;
{% endif %}
{% if vhost.return is defined %}
return {{ vhost.return }};