Different error code during proxied backend restart?

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Mon Dec 17 21:00:53 MSK 2007


> In this case nginx reports 502.
> Could you make debug log of this request ?

I found what is going on, finally. nginx indeed wants to report 502,
but then fails to find the file for 502 error:

  2007/12/17 18:55:00 [error] 28745#0: *6 connect() failed (111: Connection refused) while connecting to upstream, (...)
  2007/12/17 18:55:00 [error] 28745#0: *6 open() "/var/www/nginx-default/50x.html" failed (2: No such file or directory), (...)

nginx wants to load this file as I have in my nginx.conf the line
(IIRC put there by default in the debian package)

  error_page   500 502 503 504  /50x.html;

but the 50x.html file is in /var/www/nginx-errors, not in
/var/www/nginx-default.

So in the end it seems like some packaging inconsistency or my
forgotten mistake (I do not remember myself messing with those
params or files, but maybe ...).

PS I am still not sure whether it would not be better to keep the
original error here, but I do not know for sure.


-- 
----------------------------------------------------------------------
| Marcin Kasperski   | People resist change, regardless of what
| http://mekk.waw.pl |           it is. (Michael Reed)
|                    |
----------------------------------------------------------------------






More information about the nginx mailing list