Nginx upload module (v 2.2.0) :: 502 Bad Gateway

Guillermo Garron ggarron at
Mon Sep 5 08:38:20 UTC 2011

Your problem is that in your conf file /test location is going to some no
existent back end

Either deal with it inside nginx or have some back end listening to 8080.

That is the directive causing the problem

Ps sorry for top posting (bb issue)
------Original Message------
From: Piotr Polok
To: Nginx
ReplyTo: nginx at
Subject: Nginx upload module (v 2.2.0) :: 502 Bad Gateway
Sent: Sep 5, 2011 2:59 AM


I have compiled newest version of nginx (nginx/1.1.1) with nginx upload
module (v 2.2.0), also the example config (nginx.conf) was copied from into nginx direcoty.
The html form is also copied from this location. So the installation and
configuration is oryginal now without any changes.

I'm getting some errors while uploading the file;

The html form: '502 Bad Gateway';

The nginx error.log (/usr/local/nginx/logs/error.log):

2011/09/05 08:35:15 [error] 21161#0: *6 connect() failed (111:
Connection refused) while connecting to upstream, client:,
server: , request: "POST /upload HTTP/1.1", upstream:
"", host: "", referrer:

Maybe it's a problem of my wrong understanding how does it works, I do
not understand why in this example config the proxy_pass is going
through local 8080 port but the server in this configuration is not
listening on such port.

Please help.

best regards
Piotr Polok

nginx mailing list
nginx at

More information about the nginx mailing list