HTTP and HTTPS on a single virtual server
Problem this snippet solves: iRule to support a virtual server on port 0, a client SSL profile, and an HTTP pool.
The goal is to replace two separate HTTP and HTTPS virtual servers with a single v...
Published Mar 18, 2015
Version 1.0hooleylist
Cirrostratus
Joined September 08, 2005
hooleylist
Cirrostratus
Joined September 08, 2005
Jaz_170005
Oct 03, 2018Nimbostratus
Hello,
I am facing a challenge in which VS listens on port 80 only. I have two pools (for two different back-end apps, one of the app is secure while the 2nd one is not)--> one pool listens on port 80, the other is on 443.
I created ssl server profile and attached to VS. then by using irule I disabled ssl, only enable it when request has to go to pool_https... however I get : 400 The plain HTTP request was sent to HTTPS port
...pseudo code when CLIENT_ACCEPTED { SSL::disable serverside } when SERVER_CONNECTED { SSL::disable serverside } when HTTP_REQUEST { if {[HTTP::uri] eq "/xxx"} { pool http_pool } if {[HTTP::uri] eq "/yyy"} { SSL::enable serverside pool https_pool } }
any help? thanks in advance.