通过 Nginx 获取上传过程 +独角兽
我正在使用 Nginx 为我拥有的 Rails 应用程序反向代理我的 Unicorn 进程。我希望能够获得进度状态(类似于 apache-upload-progress-module )用于文件上传。我尝试使用 NginxHttpUploadProgressModule 但 /progress 仍然路由到 Rails 应用程序,因此不起作用。我按照 NginxHttpUploadProgressModule 中的步骤操作,所以我真的到了这里。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果没有看到您实现的确切配置,也没有看到调试日志,就很难理解可能出了什么问题。
我建议您:
您很可能正在使用 try_files 并且您的 /progress 位置不会触发,因为它位于您的 catch all 位置之后。您可以尝试将 /progress 位置放在服务器 {} 指令的顶部
Without seeing the exact configuration you implemented, nor debug log, it is difficult to understand what can be wrong.
I suggest you:
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
我正在使用它,
在服务器块中有一个部分,它工作正常,Rails 从未看到
/progress
。I am using it, have a
section in the server block and it works fine, Rails never sees
/progress
.好吧,我在你们(masterzen 和 jl)的帮助下解决了这个问题。我没有
,但是
masterzen 的评论也像我
在 /progress 之前所做的那样有帮助。非常感谢你们!
Alright so, I figured it out with the help of both you guys (masterzen, and j-l). I didn't have
but
and masterzen's comment helped also as I had
before the /progress. Thank you so much guys!!