F5 redirect context path to APACHE Web Server.
Hi there,
I’m assisting one of my customer to integrate our software with F5.
I was told that currently, F5 is configured using the Context Path (/abc) which redirect to my application’s APACHE Web Server (abc.com.au). We are not getting much help from customer’s F5 team as was told too difficult to configure iRule in F5.
F5 is configured as below:
e.g. https://example.com.au/abc - > https://abc.com.au:443
My abc.com.au Application is installed and configured based on abc.com.au (APACHE and TOMCAT) host name.
So to login to my abc.com.au application end user uses https://example.com.au/abc/login (/login is my application’s context path)
Now, back end APACHE is configured as below which make a connection to TOMCAT:
ProxyPass /login balancer://abc.com.au_Cluster/login
ProxyPassReverse /login balancer://172.31.16.26_Cluster/login
<Proxy balancer://abc.com.au_Cluster>
BalancerMember http://abc.com.au:8080 route=eda9a7ffce499a0ce772f6bef06f84be_Server1
ProxySet scolonpathdelim=on stickysession=eda9a7ffce499a0ce772f6bef06f84be_Cluster
</Proxy>
Since in header original request (https://example.com.au/abc/login) is passed to my application’s Web APACHE server; my application does not like it since all configurations are based on abc.com.au.
So in F5 is there a way to Rewrite the Request header or any other options from https://example.com.au/abc/login to https://abc.com.au/login so my application “abc.com.au” only see Request is coming from https://abc.com.au but not from https://example.com.au and end users browser only see F5 URL (https://example.com.au).
We have achieved similar requirements in Ngnix using below rule somewhere else:
#If using https, use block below
server {
listen 443 ssl; # Proxy traffic
server_name example.com.au;
ssl on;
if ($is_denied){
return 404;
}
location / {
return 404;
}
location /abc/login {
proxy_pass https://abc.com.au/login/;
}
}
Thank you for your assistance.