I have three servers in the backend, with a round robin director.
I would like varnish to write a X-Server-By header with the name or ip of the server from which the response was fetched, how can this be done?
|
I have three servers in the backend, with a round robin director. I would like varnish to write a X-Server-By header with the name or ip of the server from which the response was fetched, how can this be done? | |||
|
feedback
|
Tested on 2.0.6 in my (non round robin) setup. It should give you something to go on. | ||||
|
feedback
|
|
The following is not tested, but might get you started:
| |||
|
feedback
|
|
You can set the header on your web server eg x-host: server2 and then varnish will return that as part of the response to a cache hit. I have this working on apache and it works perfectly. | |||
|
feedback
|