I have a group of linux apache 1.3 servers behind a load balancer, and I want to be able to, at a glance, determine which server I'm hitting. The load balancer is severely limited in its monitoring capabilities, so what I'd like to do is configure apache to send an additional header indicating the machine's hostname.
I know I could just hard-code a header into the httpd.conf with the hostname:
Header set X-Which-Host-Am-I 'host1'
However, all the servers in question are mirrored with rsync, including the configs, so hard-coding the hostnames is out. Is there a way I can call the hostname
command and dump it into a header?
Clarification: Since multiple virtual hosts live on these servers, I want the physical machine's hostname, not the domain name in the request.