Location issues with upload progress module

Reinis Rozitis r at roze.lv
Wed Oct 8 15:40:06 MSD 2008

maybe somebody can tell how to work arround this. While its not a big issue 
and seems more related to Nginx overal location mechanics.

I have played arround Nginx Upload Progress Module ( 
http://wiki.codemongers.com/NginxHttpUploadProgressModule )

The problem is afteradding the proxy_pass location (according to docs) nginx 
( 0.7.17 ) forgets/doesnt use index.php on that path anymore as directory 
index ..

eg http://myserver.com/up/ returns 502 Bad Gateway:

2008/10/08 14:20:56 [error] 3249#0: *1023 recv() failed (104: Connection 
reset by peer) while reading response header from upstream, client:, server: _, request: "GET /up/ HTTP/1.0", upstream: 
"", host: ""

while http://myserver.com/up/index.php works fine....

The configuration:
http {
  upload_progress proxied 5m;

  server {
       root   /data/web/root;
       index  index.php index.htm;

    location /up {
        proxy_redirect default;
        track_uploads proxied 10s;

     location ~ \.php$ {

                if (!-f $request_filename) {
                        return 404;
                fastcgi_index  index.php;
                include        fastcgi_params;

                track_uploads proxied 10s;

  location ^~ /progress {
    # report uploads tracked in the 'proxied' zone
    report_uploads proxied;

While I can leave the 'location /up' directive out of config at all what 
enables upload progress support on every *.php wanted to know if there is 
something wrong (directive order) or missing or just supposed to work like 


More information about the nginx mailing list