tobulos1_310660
Feb 17, 2017Nimbostratus
If port 80 then HTTP else HTTPS
Hi!
We have an iRule that looks like this:
when HTTP_REQUEST {
if {[TCP::local_port] == 80 } {
pool test-pool
} elseif {[TCP::local_port] >= 3000 && [TCP::local_port] <= 3999 } {
pool test1-pool
} elseif {[TCP::local_port] >= 4000 && [TCP::local_port] <= 4999 } {
pool test2-pool
} elseif {[TCP::local_port] >= 5000 && [TCP::local_port] <= 5999 } {
pool test3-pool
} else {
drop
}
}
It basically checks that if the user goes to a certain port, he'll use a certain pool. However, one of our developers asked us if it's possible to use HTTP if the user goes to port 80, and HTTPS for all other ports. I imagine that cannot be done from within the Virtual Server, but must be done based on which pool the user goes to. How would one steer the traffic to use HTTP if the user goes to port 80, and if he goes to any other ports, HTTPS is used?
P.S. Sorry for my beginner question, I'm still an entry level network technician and haven't worked that much with load balancing yet 🙂