Forum Discussion
John_Lennon_457
Nov 30, 2010Nimbostratus
ProxyPass iRule and pools with both HTTP and HTTPS webservers
I'm using the ProxyPass v10 iRule that Kirk wrote to redirect to a pool based on URI. The webservers use HTTP except for one that requires HTTPS. All traffic comes in to a single host IP, same FQHN but I need to use a Reverse Proxy feature (I'm trying to replace Apache) to redirect based on URI to the correct pool, hence the need for the ProxyPass iRule.
I simplified the Data Group for simplicity, it would look like:
"/1" := "/1 PoolHTTP1",
"/2" := "/2 PoolHTTP2",
"/3" := "/3 PoolHTTP3",
"/4" := "/4 PoolHTTPS4",
My problem is with the last one, I don't know how to configure my VS and iRule to select HTTPS for the odd case, and keep HTTP for everything else.
The traffic flow would be:
users --HTTP--> LTM --HTTP--> PoolHTTP1-3
users --HTTP--> LTM --HTTPS--> PoolHTTPS4
In other words, users always connect to the same FQHN via HTTP, I need HTTP to the web servers in most cases and HTTPS for just one case.
Thank you in advance for your help.
- hooleylistCirrostratusHi John,
From: http://devcentral.f5.com/wiki/default.aspx/iRules/ProxyPassV10.html The following code will look up SSL profile rules from the Data Group ProxyPassSSLProfiles" and apply them. The format of the entries in this list is as follows: All entries are separated by spaces, and both items are required. The virtual server also will need to have any serverssl profile applied to it for this to work.
- John_Lennon_457NimbostratusAaron,
- hooleylistCirrostratusHi John,
set profilename [findclass $pool ProxyPassSSLProfiles " "] if {$profilename eq ""} { if { [PROFILE::exists serverssl] == 1} { Hide this command from the iRule parser (in case no serverssl profile is applied) set disable "SSL::disable serverside" catch {eval $disable} } return }
- John_Lennon_457NimbostratusThank you Aaron, I appreciate your help here.
- Fabrizio_ChiavaNimbostratusHi,
- hooleylistCirrostratusHi Fabrizio,
- Fabrizio_ChiavaNimbostratusHi Aaron,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects