streamhost.erb 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. # MANAGED BY PUPPET
  2. server {
  3. <%- if @listen_ip.is_a?(Array) then -%>
  4. <%- @listen_ip.each do |ip| -%>
  5. listen <%= ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>;
  6. <%- end -%>
  7. <%- else -%>
  8. listen <%= @listen_ip %>:<%= @listen_port %><% if @listen_options %> <%= @listen_options %><% end %>;
  9. <%- end -%>
  10. <%# check to see if ipv6 support exists in the kernel before applying -%>
  11. <%- if @ipv6_enable && (defined? @ipaddress6) -%>
  12. <%- if @ipv6_listen_ip.is_a?(Array) then -%>
  13. <%- @ipv6_listen_ip.each do |ipv6| -%>
  14. listen [<%= ipv6 %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %>;
  15. <%- end -%>
  16. <%- else -%>
  17. listen [<%= @ipv6_listen_ip %>]:<%= @ipv6_listen_port %> <% if @ipv6_listen_options %><%= @ipv6_listen_options %><% end %>;
  18. <%- end -%>
  19. <%- end -%>
  20. server_name <%= @server_name.join(" ") %>;
  21. <% Array(@raw_prepend).each do |line| -%>
  22. <%= line %>
  23. <% end %>
  24. proxy_timeout <%= @proxy_read_timeout %>;
  25. proxy_connect_timeout <%= @proxy_connect_timeout %>;
  26. proxy_pass <%= @proxy %>;
  27. <% Array(@raw_append).each do |line| -%>
  28. <%= line %>
  29. <% end -%>
  30. }