Forum Discussion
ccmoore
Apr 14, 2023Nimbostratus
f5 reverse proxy to remove ports in URI
Hello, I have to containers running on an internal docker host. Two apps presenting on two ports. 9445 and 42828. I have one domain testws02.usneeded.com. to hit the containers now we have to go t...
Apr 14, 2023
You could try using a local traffic policy:
testws02.usneeded.com/v9 => testws02.usneeded.com:9445
testws02.usneeded.com/v10 => testws02.usneeded.com:42828
Replace <NODE IP> with the actual IP of the back-end server.
create ltm policy Drafts/POLICY-REWRITE-TESTWS02.USNEEDED.COM strategy all-match rules add { v9 { ordinal 0 conditions add { 0 { http-host host equals values { testws02.usneeded.com } } 1 { http-uri path starts-with values { /v9 } } } actions add { 0 { http-uri replace value / } 1 { forward select node <NODE IP>:9445 } } } v10 { ordinal 1 conditions add { 0 { http-host host equals values { testws02.usneeded.com } } 1 { http-uri path starts-with values { /v10 } } } actions add { 0 { http-uri replace value / } 1 { forward select node <NODE IP>:42828 } } } }
publish ltm policy Drafts/POLICY-REWRITE-TESTWS02.USNEEDED.COM
modify ltm virtual <VS NAME> policies add { POLICY-REWRITE-TESTWS02.USNEEDED.COM }
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