Listen <%= @ip %>:<%= @port %>
<VirtualHost <%= @ip %>:<%= @port %>>
  <Location />
    Order deny,allow
    Deny from all
    Allow from <%= @allowed_network %>
  </Location>

  KeepAliveTimeout <%= @keep_alive_timeout %>
  MaxKeepAliveRequests <%= @max_keep_alive_requests %>
  EnableMCPMReceive <%= scope.call_function('apache::bool2httpd', [@enable_mcpm_receive]) %>

  ManagerBalancerName <%= @balancer_name %>
  ServerAdvertise <%= scope.call_function('apache::bool2httpd', [@server_advertise]) %>
  <%- if @server_advertise == true and @advertise_frequency != nil -%>
  AdvertiseFrequency <%= @advertise_frequency %>
  <%- end -%>

  <Location /mod_cluster_manager>
    SetHandler mod_cluster-manager
    Order deny,allow
    Deny from all
    Allow from <%= @manager_allowed_network %>
  </Location>

</VirtualHost>
