Hi Arnold, I've annotated the rule you provided with some comments - I hope that they make it clear. If your rule encounters a host header that it does not recognise, it will set $pool to the empty string (""). This will provoke the warning message you report, so I've added a test for that situation too. regards Owen # Retrieve the host header provided by the client. This is generally the domain name in the URL. # The getHostHeader() function simplifies the host header, removing any port component, # converting to lowercase, remove trailing '.', etc, so the result is unambiguous $hh = http.getHostHeader(); # Now try to determine the webserver pool that serves requests for that host header $poolmap = [ "start.rs.com" => "p_RCD_prod.start.rs.com_http", "www.rs.com" => "p_RCD_prod.rs.com_http", "rs.com" => "p_RCD_prod.rs.com_http", "prod.rs.com" => "p_RCD_prod.rs.com_http", "authentication.rs.com" => "p_RCD_prod.authentication.rs.com_http", "service.rs.com" => "p_RCD_prod.services.rs.com_http", "reports.rs.com" => "p_RCD_prod.reports.rs.com_http" ]; $pool = $poolmap[ $hh ]; # If $pool is empty, that's because the hostheader $hh did not match a key in $poolmap # Let's return an error (404 is typical for an unrecognized host header) if( $pool == "" ) { http.sendResponse( "404 Not Found", "text/plain", "Unrecognised host ".$hh, "" ); } # If none of the nodes in the pool are functioning, the pool will return an error. We can # test this and return a different error if we want (Zeus users will recognize this message) if( pool.activeNodes( $pool ) == 0 ) { http.sendResponse( "503 Unavailable", "text/plain", "No suitable nodes are available to serve your request", "" ); } # Everything appears OK. $pool contains the name of a valid, working pool. Let's use it pool.use( $pool );
... View more