Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the following problem with squid:

Some clients access concurrently 62 servers via a squid proxy. All servers have the same host name ( but different public IPs ( to The server owner uses a kind of dns round robin.

I only have access to the squid server and to the clients. The connection to the servers is only allowed via the proxy IPs.

Without proxy, I just send a request to load data from http// but I send the host header "". That works like it should.

But now using squid as a non caching proxy this is not possible anymore. Squid overrides the sent request host header. By doing this, the destination server does not know what data to deliver because the host-header is not correctly transmitted.

I set

url_rewrite_host_header off

But this does not have any effect. It seems that this option is only used when using squid as redirector. That is not what I do.

The following will work, if there were no other sites to fetch:

header_access Host deny all
header_replace Host

But when I do this, every request will get the host header. Then it is not possible to access other sites anymore.

What can I do?

Thanks in advance for your help!

share|improve this question
What is the host header being rewritten to? – Andrew B Jan 9 '13 at 21:27
The host header is rewritten to the IP address ( in my example). – Chris Jan 10 '13 at 0:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.