1

I'm using Nginx to reverse proxy my Unicorn process for a Rails app that I have. I would like to be able to get a progress status (similar to apache-upload-progress-module) for file uploads. I tried to use NginxHttpUploadProgressModule but /progress still routes to the Rails app so that doesn't work. I followed the steps in NginxHttpUploadProgressModule so I'm really at a stopping point here.

3 Answers 3

4

Without seeing the exact configuration you implemented, nor debug log, it is difficult to understand what can be wrong.

I suggest you:

  1. compile nginx with the --with-debug option and activate debug log with the error_log directive.
  2. check the debug log for the /progress request and look the order of the tested locations.

It is well possible you are using try_files and your /progress location doesn't trigger because it is located after your catch all location. You can try to put the /progress location at the top of your server {} directive

Sign up to request clarification or add additional context in comments.

Comments

1

I am using it, have a

location ^~ /progress {
  upload_progress_json_output;
  report_uploads proxied;
}

section in the server block and it works fine, Rails never sees /progress.

1 Comment

Is there anything else needed in the nginx conf file? Do you need a "track_uploads" section somewhere as well? If so, what else goes in the block with it?
1

Alright so, I figured it out with the help of both you guys (masterzen, and j-l). I didn't have

location ^~ /progress {
  upload_progress_json_output;
  report_uploads proxied;
}

but

location ^~ /progress {
  report_uploads proxied;
}

and masterzen's comment helped also as I had

location / {
  # blah blah
}

before the /progress. Thank you so much guys!!

1 Comment

Do you need a "track_uploads" section in your nginx config somewhere? If so, where does that go, and what else goes in the location block with it?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.