nginx reports [upstream sent no valid HTTP/1.0 header] when used with varnish

Joydeep Bakshi joydeep.bakshi at
Tue Apr 22 07:25:07 UTC 2014

Hello all,

My setting works well  through nginx->apache but not through

apache is configured to listen to port 8080 . when nginx uses


the sites are running fine.

If I introduce varnish after nginx  by  [proxy_pass]
 the nginx starts throwing following error and browser also shows "*Zero
Sized Reply"*

[error] 17147#0: *207 upstream sent no valid HTTP/1.0 header while reading
response header from upstream

and /var/log/messages shows

varnishd[16984]: CLI telnet 42212 6082 Wr 101 Unknown
request.#012Type 'help' for more info.#012all commands are in lower-case.

varnishd[16984]: CLI telnet 42212 6082 Rd
Cache-Control: max-age=0

obviously varnish is configured to listen to apache

backend default {
        .host = "";
        .port = "8080";

Can anyone please suggest the possible reason which is causing the problem ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list