vhosts.j2 776 B

123456789101112131415161718192021222324252627282930
  1. {% for vhost in nginx_vhosts %}
  2. server {
  3. listen {{ vhost.listen | default('80 default_server') }};
  4. server_name {{ vhost.server_name }};
  5. {% if vhost.root is defined %}
  6. root {{ vhost.root }};
  7. {% endif %}
  8. index {{ vhost.index | default('index.html index.htm') }};
  9. {% if vhost.error_page is defined %}
  10. error_page {{ vhost.error_page }};
  11. {% endif %}
  12. {% if vhost.access_log is defined %}
  13. access_log {{ vhost.access_log }};
  14. {% endif %}
  15. {% if vhost.error_log is defined %}
  16. error_log {{ vhost.error_log }} error;
  17. {% endif %}
  18. {% if vhost.return is defined %}
  19. return {{ vhost.return }};
  20. {% endif %}
  21. {% if vhost.extra_parameters is defined %}
  22. {{ vhost.extra_parameters }}
  23. {% endif %}
  24. }
  25. {% endfor %}