Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

Redirect HTTP traffic to HTTPS on CSM

Greetings,

Does anyone know how to redirect HTTP traffic to HTTPS when using CSM and SSL?

Thanks,

Mohamad

1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Re: Redirect HTTP traffic to HTTPS on CSM

Hi Mohamad,

I've seen this done in slightly different ways.  One way is at the very bottom of the following examples from the Cisco.com CSM-S config guide:

CSM-S Configuration Examples

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/csms/2.1.1/configuration/guide/cfgxpls.html

Another way is like this:

serverfarm REDIRECT
  nat server
  no nat client
   redirect-vserver REDIRECT
    webhost relocation https://www.example.com/
    inservice
!
serverfarm SSL_DC
  no nat server
  no nat client
  real 192.168.78.36 local
   inservice
!
vserver VSERVER_80
  virtual 192.168.78.35 tcp 80
  serverfarm REDIRECT
  persistent rebalance
  inservice
!
vserver VSERVER_443
  virtual 192.168.78.35 tcp 443
  serverfarm SSL_DC
  persistent rebalance
  inservice

Hope this helps get you started.

Sean

2 REPLIES
Silver

Re: Redirect HTTP traffic to HTTPS on CSM

Hi Mohamad,

I've seen this done in slightly different ways.  One way is at the very bottom of the following examples from the Cisco.com CSM-S config guide:

CSM-S Configuration Examples

http://www.cisco.com/en/US/docs/interfaces_modules/services_modules/csms/2.1.1/configuration/guide/cfgxpls.html

Another way is like this:

serverfarm REDIRECT
  nat server
  no nat client
   redirect-vserver REDIRECT
    webhost relocation https://www.example.com/
    inservice
!
serverfarm SSL_DC
  no nat server
  no nat client
  real 192.168.78.36 local
   inservice
!
vserver VSERVER_80
  virtual 192.168.78.35 tcp 80
  serverfarm REDIRECT
  persistent rebalance
  inservice
!
vserver VSERVER_443
  virtual 192.168.78.35 tcp 443
  serverfarm SSL_DC
  persistent rebalance
  inservice

Hope this helps get you started.

Sean

Re: Redirect HTTP traffic to HTTPS on CSM

Thank you Sean,

I was able to make the redirects works by doing something similar to what you mentioned.

Thanks,

Mohamad

604
Views
0
Helpful
2
Replies