11-19-2013 11:52 AM
Hi,
I need to configure a new VIP so that if the requests come on port 80 it sends a redirection message to clients saying to try on port HTTPS://*:9443, is the configuration below correct?
rserver host server1
description host1
ip address 1.1.1.1
probe probe-http
inservice
rserver host server2
description host2
ip address 1.1.1.2
probe probe-http
inservice
serverfarm host sfarm1
rserver server1
inservice
rserver server2
inservice
rserver redirect sfarm1_redirect_9443
webhost-redirection https://%h:9443%p 301
inservice
serverfarm redirect sfarm_redirect_9443
rserver sfarm1_redirect_9443
inservice
class-map match-all VIP_HTTP
description Match HTTP
2 match virtual-address 2.2.2.2 tcp eq www
class-map match-all VIP_HTTPS
description Match HTTPS
2 match virtual-address 2.2.2.2 tcp eq 9443
policy-map type loadbalance first-match http_Redirect_Policy
class class-default
serverfarm sfarm_redirect_9443
policy-map type loadbalance first-match https_9443
class class-default
serverfarm sfarm1
policy-map multi-match VIPS
class VIP_HTTP
loadbalance vip inservice
loadbalance policy http_Redirect_Policy
loadbalance vip icmp-reply active
class VIP_HTTPS
loadbalance vip inservice
loadbalance policy https_9443
loadbalance vip icmp-reply active
11-19-2013 12:07 PM
Hi,
Your configuration looks good and it should redirect as configured.
Regards,
Kanwal
11-19-2013 12:25 PM
Hi,
%h and %p are usually used when host and path remain same as is the case in redirection from http to https.
You can also use the actual hostname and path if the above doesn't work. I think it should work but i haven't tested it before.
You can try something like below:
webhost-redirection https://test.com:9443 301
Let me know how it goes.
Regards,
Kanwal
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide