How to make nginx establish persistent connections with squid?

selphon nginx-forum at
Sun Mar 24 08:42:36 UTC 2013

Hi, Maxim Dounin

I revise the  topology:
chrome --> squid:80 --> origin server(nginx :80)

and make 5 requests,the squid log shows: - - [22/Mar/2013:15:41:41 +0800] "GET HTTP/1.1" 304 365
"" "Mozilla/5.0 (Windows NT 6.1)
AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22"

"Host:  #request header
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.22 (KHTML, like
Gecko) Chrome/25.0.1364.172 Safari/537.22
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3
If-Modified-Since: Tue, 23 Oct 2012 04:07:19 GMT"

"HTTP/1.0 304 Not Modified  #response header
Server: nginx/1.2.6
Date: Fri, 22 Mar 2013 07:41:41 GMT
Last-Modified: Tue, 23 Oct 2012 04:07:19 GMT
Expires: Fri, 22 Mar 2013 09:41:41 GMT
Cache-Control: max-age=7200
X-Cache: MISS from
X-Cache-Lookup: HIT from
Via: 1.1 (squid/2.7.STABLE9)
Connection: keep-alive"

Though the response is in HTTP/1.0, the persistent connections is
successfully established  between chrome and squid. I wonder, is there a
restriction that nginx can only make establish persistent connections when
the response is in HTTP/1.1 protocol ?
Thx for answering.

Posted at Nginx Forum:,237666,237714#msg-237714

More information about the nginx mailing list