We have configured two virtual servers: VS_App1 : 443 & VS_App1 : 80
There is one iRule applied to both, that checks the URI and according to it, selects the corresponding pool. For some requests arriving to the SSL port, we need to send them through HTTP (not HTTPS) to some pools.
If we simply select a pool listening on the port 80 and send the request it does not work, because it tries to send it through HTTPS.
Since the iRule is associated to both Virtual servers, we cannot use SSL:disable, because the VS_App1 : 80 has no SSL profile associated.
You can “hide” the SSL::disable command from the iRule parser and only use the command when the VIP port (TCP::local_port) is HTTPS and the pool is not for HTTPS:
when LB_SELECTED {
Check if the VIP port is for SSL
This could be a single port like 443 or multiple ports
switch [TCP::local_port] {
443 {
Check if server port is not SSL
if {!([LB::server port] == 443)}{
set ssl_disable_cmd "SSL::disable serverside"
eval $ssl_disable_cmd
}
}
}
}
If the exact logic isn’t correct for your scenario and you want help adjusting the example, please reply with more info on when you want to disable SSL on the serverside connection.