Forum Discussion
iRule for HTTPS Virtual Server without applying http profile
Hi,
We have create the Virtual server for redirection of http to https traffic and https traffic for BMC application and almost successful in achieving the desired result; but since end result was not upto requirement, we have revert back the VIP configuration for BMC to http traffic.
below is details :- Pool of BMC Server :- 192.168.220.205 and 192.168.220.206 (working on port 8443) Virtual Server IP Address for BMC server :- 192.168.199.71 (working on port 443) Virtual Server IP Address for BMC server :- 192.168.199.71 (working on port http for redirection of http to https)
When we created the virtual server in F5 with 10.3.199.71 on 443 service port; https://xyz/arsys website link was working; as same URL website has been hosted on webserver and redirection of http to https also happening without any issue.
we are facing issue with accessing https://xyz/ link while trying to access website through F5; as web server don't have any website link for below site.We tried to redirect the traffic on F5 for https://xyz/ to https://xyz/arsys ; but unable to achieve the desired result.
Please help. Any help is welcome to create irule.
- Kevin_Davies_40NacreousPlease edit your post, highlight the entire paragraph starting with below is details, hit tab key. Then save message. It will then format it the way you expect.
- Kevin_Davies_40Nacreous...as web server don't have any website link for below site. Which below site are you referring to?
- Anil_Gupta_01_1Nimbostratus
When we created the virtual server in F5 with 10.3.199.71 on 443 service port; https://xyz/arsys website link was working; as same URL website has been hosted on webserver and redirection of http to https also happening without any issue.
we are facing issue with accessing https://xyz/ link while trying to access website through F5; as web server don't have any website link for below site.
We tried to redirect the traffic on F5 for https://xyz/ to https://xyz/arsys ; but unable to achieve the desired result.
- Anil_Gupta_01_1Nimbostratus
Please help in to create irule.
- Cory_50405Noctilucent
Can you please post your virtual server configurations? Based on the original question, you cannot perform HTTP actions on a connection (redirection for example) if you don't have these two things:
- HTTP profile assigned to the virtual server
- Client SSL profile assigned to the virtual server
- Anil_Gupta_01_1Nimbostratus
This is my query.
For doing redirecting of website on F5 from https://xyz/ to https://xyz/arsys; whether we need to assign http profile to the virtual server; since my virtual server is working on https service.
because whenever we are applying the http profile (default) for https virtual server, our normal website is not working https://xyz/arsys.
thanks for your help in advance.
- Anil_Gupta_01_1Nimbostratus
This is my query.
For doing redirecting of website on F5 from https://xyz/ to https://xyz/arsys; whether we need to assign http profile to the virtual server; since my virtual server is working on https service.
because whenever we are applying the http profile (default) for https virtual server, our normal website is not working https://xyz/arsys.
thanks for your help in advance.
- Cory_50405Noctilucent
Your virtual server will "work" if you have it configured to listen on port 443 and have pool members to send the connections to. The LTM in this case is not terminating the SSL or doing anything above layer 4.
If you want any HTTP redirection, then you'll need to terminate the SSL (client SSL profile) and apply an HTTP profile so the LTM will treat the application data as HTTP. Only after you do these two things will you be able to perform HTTP redirects or modify any of the HTTP (layer 7) information.
If you apply an HTTP profile to a virtual server without terminating SSL, it will not work because the LTM is going to attempt to treat the encrypted data as HTTP.
- Anil_Gupta_01_1Nimbostratus
Hi Cory,
Thanks for your prompt response.
As per understanding from above comment, we need to apply http profile and client SSL profile to Virtual Server created for https service.
For applying http profile, can we used the default or we need to do any changes on http profile before applying to VS.
For irule configuration, request your help. currently we have created below, but not working.
when HTTP_REQUEST { set uri [string tolower [HTTP::uri]]
if { $uri eq "/" } { HTTP::respond 301 Location "https://xyz/arsys" }
}
- Cory_50405Noctilucent
The default HTTP profile should suffice in most cases. Try this iRule:
when HTTP_REQUEST { if { [HTTP::uri] eq "/" } { HTTP::redirect "https://xyz/arsys" } }
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