502 Bad Gateway

mailing at securitylabs.it mailing at securitylabs.it
Mon Mar 26 11:45:00 UTC 2012


Il 26/03/2012 13:41, Raphael Marot ha scritto:
> Hi all,
>
> I have a simple setup with Nginx in front Apache, under debian wheezy 
> (nginx for static content, apache for php)
> Since the last Nginx update (1.1.17-2 via apt-get), every night after 
> daily crons i have a 502 error (bad gateway) until i reload apache.
> Everything was fine before.
> I tried to reload apache after nginx in the logrotate daily task, but 
> without effect.
> In my logs i just have :
>
> [error] 22332#0: *10804 connect() failed (111: Connection refused) 
> while connecting to upstream
>
> Where should i look at?
>
Look at Apache's logs. It seems that apache does not restart correctly 
after che log rotate, and a manual restart fix it. The error tells you 
that nginx  can't communicate with apache.



More information about the nginx mailing list