Redirect HTTP traffic to HTTPS on CSM

Answered Question
Jan 26th, 2010

Greetings,

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

Thanks,

Mohamad

I have this problem too.
0 votes
Correct Answer by Sean Merrow about 6 years 11 months ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Sean Merrow Fri, 01/29/2010 - 06:47

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

Mohamad Qayoom Fri, 01/29/2010 - 07:44

Thank you Sean,

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

Thanks,

Mohamad

Actions

This Discussion