nginx.conf.j2 468 B

123456789101112131415161718192021222324
  1. upstream {{ app_cluster_domain }} {
  2. {% for it in groups['www'] %}
  3. server {{ it }};
  4. {% endfor %}
  5. fair;
  6. }
  7. server {
  8. listen 80;
  9. listen [::]:80;
  10. gzip on;
  11. server_name {{ inventory_hostname }};
  12. client_max_body_size 16M;
  13. charset utf-8;
  14. access_log off;
  15. error_log /var/log/nginx/{{ inventory_hostname }}.error.log warn;
  16. location / {
  17. proxy_set_header Host $host;
  18. proxy_pass http://{{ app_cluster_domain }};
  19. }
  20. }