cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
991
Views
0
Helpful
2
Replies

ACE port redirection message to client

jrmalmeida
Level 1
Level 1

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

2 Replies 2

Kanwaljeet Singh
Cisco Employee
Cisco Employee

Hi,

Your configuration looks good and it should redirect as configured.

Regards,

Kanwal

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

Review Cisco Networking for a $25 gift card