Content switching & cookies - problem with default_backend

From: James Little <>
Date: Thu, 11 Sep 2008 16:37:04 +0100


I'm testing out a simple content switching config using ACLs as below:

frontend f1

	acl test_acl1 path_beg /test1
	acl test_acl2 path_beg /test2
	use_backend b1 if test_acl1
	use_backend b2 if test_acl2
	default_backend b2
	option httpclose

backend b1
	cookie	SERVERID insert nocache indirect
	server s1 weight 1 cookie s1 check
	server s2 weight 1 cookie s2 check

backend b2
	cookie	SERVERID insert nocache indirect
	server s3 weight 1 cookie s3 check

The problem is that the cookie from the default_backend (i.e. the cookie content = s3), seems to override any other cookie. So the cookie content is 's3' regardless of whether you are in the root, or / test1, /test2.

If I remove the default_backend option then the cookie insertion works as expected.

I am also wondering if there is a way to specify the cookie path, so that I could have two different cookies, one for /test1 and one for / test2?

Any help greatly appreciated.


James Little
Received on 2008/09/11 17:37

This archive was generated by hypermail 2.2.0 : 2008/09/11 17:46 CEST