Forum Discussion
paul_fairclough
Nimbostratus
Sep 26, 2007port redirect - server side
** SOLVED ** problem with other Irule
We need to allow an inbound port 80 request to the F5 vip. We then need to complete the connection to the backend server on port 8080. ( not url redirect )
Following irule was created with this in mind but doesn't provide the correct functionality ( doesn't redirect to port 8080 )
when HTTP_REQUEST {
if { [HTTP::host] starts_with "www.sitea.com"} {
pool Apache_Pool
}
elseif { [HTTP::host] starts_with "www.siteb.com" } {
HTTP::header replace "Host" "www.siteb.com:8080"
}
}
Cheers
5 Replies
- johns
Employee
What about simplifying it a bit and use a pool with nodes on 8080? Create Apache_pool_8080 and add the nodes with port 8080 configured. BIG-IP will then just do port translation instead of iRule having to do a redirect or re-write of the URL. - paul_fairclough
Nimbostratus
I tried this with a basic irule referring the 2 different sites to the 2 pools like you suggested. The site running on 80 was ok, but the site running on 8080 did not work. - Deb_Allen_18Historic F5 AccountHi Paul -
2 sites...?
You only mention 1 above
Please provide more specifics as to what you need to accomplish, & I'm sure we can help you further.
/deb - paul_fairclough
Nimbostratus
Hi deb
I have 2 sites defined on a web server one running on port 80 one running on port 8080. Without having to add :8080 to my url I need the traffic for the 2 independent sites to be forwarded to the corresponding site on the backend server. If you need more info please let me know.
paul - paul_fairclough
Nimbostratus
Have solved this problem...
Not a problem with the irule above problem was caused by another irule having some unexpected behaviour on site header.
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
