Forum Discussion
iRule for Reverse Proxy on the F5.
Experts, To being with I am essentially using my F5 box as a reverse proxy. I have an external facing domain, "nik.test.com".
When the client hits this domain this lands on a VIP configured on the F5 box(DMZ Network). Now this VIP has a iRule written which redirects the http request to "nik-int.bmc.com". This "nik-int.bmc.com" is on the internal network.
The iRule is working but it converts the URL from "nik.test.com" to "nik-int.bmc.com". "nik-int.bmc.com" is not resolvable externally and that causes an issue. What I need is that "nik.test.com" only fetches data from "nik-int.bmc.com" and does not convert the URL.
Here is the sample of the iRule:
when HTTP_REQUEST { HTTP::redirect "http://nik-int.test.com/media/[HTTP::uri]" }
Regards, Nikhil Kulkarni.
3 Replies
- LyonsG_85618
Cirrostratus
Instead of redirect you need to replace the host:
HTTP::header replace Host "nik-int.test.com"
- IheartF5_45022
Nacreous
I think you mean; when HTTP_REQUEST { HTTP::header replace Host "nik-int.bmc.com" } - LyonsG_85618
Cirrostratus
yes - i guess i should have qulified it but thought 'instead of redirect' would have made sense...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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