<!DOCTYPE safe>
<safe>
<!-- Define the service names, in the startup order, separated by commas (,)
    Use the Get-Service PowerShell cmdlet to get the service names
-->
<macro name="SERVICES" value="Apache2"/>
<macro name="VIRTUAL_IP" value="" />
<macro name="APACHE_PORT" value="" />
<service mode="farm" boot="on">
  <!-- Farm topology configuration for the membership protocol -->
  <farm>
    <lan name="default" />
  </farm>
  <!-- Virtual IP Configuration -->
  <!-- Use VIRTUAL_IP defined in macro above -->
  <vip>
    <interface_list>
      <interface>
        <virtual_interface type="vmac_directed">
          <virtual_addr addr="%VIRTUAL_IP%" where="alias"/>
        </virtual_interface>
      </interface>
    </interface_list>
    <loadbalancing_list>
      <group name="APACHE">
        <!-- Set load-balancing rule on APACHE_PORT defined in macro above -->
        <rule port="%APACHE_PORT%" proto="tcp" filter="on_addr"/>
      </group>
    </loadbalancing_list>
  </vip>
  <!-- TCP Checker Configuration -->
  <!-- Use VIRTUAL_IP and APACHE_PORT defined in macros above -->
  <check>
    <tcp ident="HTTP_APACHE" when="both">
      <to
         addr="%VIRTUAL_IP%"
         port="%APACHE_PORT%"
         interval="10"
         timeout="5"
       />
    </tcp>
  </check>
  <!-- User scripts activation -->
  <user>
    <var name="SERVICES" value="%SERVICES%"/>
  </user>
</service>
</safe>
