IIS Hostheader

Answered Question
Nov 16th, 2007

Hi

I am having a problem with a CSS11501, everything is working fine performing simple load balancing accross a number of IIS web servers.

However, I need the http keepalive to poll a file on the each server, but the IIS configuration requires that I use a hostheader.

I have tried using redirect-string and using a name instead of an IP address but the CSS just resolves the name and puts the ip in the config.

An pointers would be gratefully received.

Many Thanks

Rich

I have this problem too.
0 votes
Correct Answer by Diego Vargas about 9 years 3 weeks ago

Hi Rich,

My advise is to use script ap-kal-httptag, where the value of this header(tag) can be specified as the last argument.

Considering this example configuration

service test

ip address 10.10.10.1

keepalive type http

keepalive method get

keepalive uri /test.html"

active

Modified one can be

service test

ip address 10.183.121.241

keepalive type script ap-kal-httptag "10.183.121.241 /test.html www.test.com"

active

Replace string www.test.com with the content of host header your server expects to see

instead of IP address. You find it in the IIS configuration, near the place where you

configure it to listen to host names only.

Hope it helps!!

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Diego Vargas Fri, 11/16/2007 - 10:15

Hi Rich,

My advise is to use script ap-kal-httptag, where the value of this header(tag) can be specified as the last argument.

Considering this example configuration

service test

ip address 10.10.10.1

keepalive type http

keepalive method get

keepalive uri /test.html"

active

Modified one can be

service test

ip address 10.183.121.241

keepalive type script ap-kal-httptag "10.183.121.241 /test.html www.test.com"

active

Replace string www.test.com with the content of host header your server expects to see

instead of IP address. You find it in the IIS configuration, near the place where you

configure it to listen to host names only.

Hope it helps!!

karthikraman Tue, 11/29/2011 - 02:18

Hi Diego.

Great solution.I have a similar kind of suitation on the ACE ,

Can we dont something similar on the Cisco ACE20-MOD-K9, how do we write a script on the ACE ?? Any thoughs or suggestions.

Thanks in advance.

Karthik Raman

pablo.nxh Tue, 11/29/2011 - 19:29

Hi Karthik,

This is actually "easier" on the ACE as you don't need a scripted probe:

Just do something like this:

probe http Shop
  request method head url /shop.html
  expect status 200 200
  header Host header-value "cars.com"

  interval 15

  open 1

probe http News
  request method head url /news.html
  expect status 200 200
  header Host header-value "cars.com"

  interval 15

  open 1

Then apply the configuration either under the rservers in the SF in question.

HTH

__ __

Pablo

karthikraman Thu, 12/01/2011 - 01:57

Hi Pablo

Thanks for your response .

The solution works fine if the probe is used for one single application running on 2 load balaced server.  The issue or

scenario that I am having is a common probe for two URL's/ web application is configured on the 2 load balanced server.

Below is the config

---------------------------------------------------PROBES---------------------------------------------------

probe http Test-Prod_PROBE

   port 80 

  interval 20

faildetect 4

  passdetect interval 10

  request method head url /Testpage.html

  expect status 200 200

  open 1

-------------------------------------------------RSERVERS-----------------------------------------------------

rserver host testweb1

  ip address 10.x.x.101

  inservice

rserver host testweb2

  ip address 10.x.x.102

  inservice

Note: I would use this to send anyone coming in on HTTP (80) to be redirected to HTTPS (443)

rserver redirect http-to-https

  webhost-redirection https://%h%p  

  inservice

---------------------------------------------------- SSL PROXY---------------------------------------------------

ssl-proxy service ROUTER_OFFLOAD

  key router.com

  cert router.PEM

ssl-proxy service SWITCH_OFFLOAD

  key switch.com

  cert switch.PEM

-------------------------------------------------------SERVERFARMS----------------------------------------------

serverfarm host Test-Router_SFARM

probe Test-Prod_PROBE 

reserver testweb1 80

inservice

reserver testweb2 80

  inservice

serverfarm host Test-Switch_SFARM

probe Test-Prod_PROBE

reserver testweb1 8080

inservice

reserver testweb2 8080

  inservice

serverfarm redirect GENERAL_HTTP_REDIRECT_SFARM -------> Used to redirect HTTP to HTTPS

  rserver http-to-https

    inservice

---------

On the  two server testweb1 and testweb2 - the http keepalive - /Testpage.html  is configured on a common root directory,  and not on the application.   Hence the ACE always sees the server as up and operational. But when the  application is down and the server is up the ACE is not aware of the  face the app is down and keep sending traffice to the web app or server.

Any thoughs or suggestions.

Thank

Karthik Raman

Actions

This Discussion