Welcome! Log In Create A New Profile

Advanced

Nginx Upload Progress Module stops functioning once behind reverse-proxy

Ben Johnson
February 16, 2015 02:56PM
Hello,

I've recently compiled nginx-1.7.10 with a third-party upload-progress
tracking module, which is described at
http://wiki.nginx.org/HttpUploadProgressModule .

This module works perfectly well, until I attempt to put the entire
setup behind a reverse-proxy.

Below is a simplified configuration that demonstrates the issue I'm having.

With this configuration, the upload progress reporting functions
correctly *only* if I access the reverse-proxy port directly, at
https://example.com:1337.

As soon as I attempt to access the upstream host at https://example.com
(on port 443, instead of the proxy port, 1337), the upload progress
module always reports "starting" as its state (which, according to the
documentation, implies "the upload request hasn't been registered yet or
is unknown").

Once I have this working with the reverse-proxy in-place, I want to
change the line "listen *:1337 ssl;" to "listen 127.0.0.1:1337 ssl;" so
that user-agents cannot access the proxy directly.

Might anyone know why this module ceases to work correctly once behind a
reverse-proxy, as the below config demonstrates?

Is there some proxy-specific configuration directive that I've overlooked?

Thanks for any help!

-Ben



###################################################################
http {
server {
listen *:443 ssl;

location ^~ / {
proxy_pass https://127.0.0.1:1337;
}
}

upload_progress uploads 5m;

server {
listen *:1337 ssl;

location @virtual {
include fastcgi_params;
fastcgi_pass unix:/var/lib/php5-fpm/web1.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}

location = /progress/ {
report_uploads uploads;
upload_progress_json_output;
}

location /file-upload/progress/ {
proxy_pass https://127.0.0.1:1337;
track_uploads uploads 5s;
}
}
}
###################################################################


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx Upload Progress Module stops functioning once behind reverse-proxy

Ben Johnson February 16, 2015 02:56PM

Re: Nginx Upload Progress Module stops functioning once behind reverse-proxy

Francis Daly February 16, 2015 03:54PM

Re: Nginx Upload Progress Module stops functioning once behind reverse-proxy

Ben Johnson February 17, 2015 09:32PM

Re: Nginx Upload Progress Module stops functioning once behind reverse-proxy

Francis Daly February 18, 2015 04:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 305
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready