|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
{% if pillar['nginx'] is defined -%} |
|
|
{% if pillar['nginx'] is defined -%} |
|
|
{% if pillar['nginx']['redirect_numeric_ip']|default(False) %} |
|
|
|
|
|
|
|
|
{% if pillar['nginx']['redirect_numeric_ip']|default(False) -%} |
|
|
server { |
|
|
server { |
|
|
server_name {% for ip in salt['network.interfaces']()['eth0']['inet'] %}{{ ip['address'] }}:80{% if not loop.last %} {% endif %}{% endfor %}; |
|
|
server_name {% for ip in salt['network.interfaces']()['eth0']['inet'] %}{{ ip['address'] }}:80{% if not loop.last %} {% endif %}{% endfor %}; |
|
|
return 302 {{ pillar['nginx']['redirect_numeric_ip'] }}; |
|
|
return 302 {{ pillar['nginx']['redirect_numeric_ip'] }}; |
|
|
access_log off; |
|
|
access_log off; |
|
|
} |
|
|
} |
|
|
{% endif %} |
|
|
|
|
|
{% endif %} |
|
|
|
|
|
|
|
|
{% endif -%} |
|
|
|
|
|
{% endif -%} |
|
|
|
|
|
|
|
|
include /etc/nginx/conf.d/*.conf; |
|
|
include /etc/nginx/conf.d/*.conf; |
|
|
include /etc/nginx/sites-enabled/*.conf; |
|
|
include /etc/nginx/sites-enabled/*.conf; |