Welcome! Log In Create A New Profile

Advanced

POST method with x-accel-redirect

December 06, 2016 12:02AM
Hi Nginx guru,

I am a new nginx user working on implementing a protected upload and
download service based on nginx. With an older version 1.4.6 I was able to
make it work. But since we upgraded it to 1.10.1 it seems the POST method
is changed to GET during the redirect. I saw Maxim had a post (
https://forum.nginx.org/read.php?2,263661,264440#msg-264440) describing
this issue. But I am still not sure what does it mean by "x-accel-redirect
to a named location". I tried wrapping the *file_server* section below into
a named location, and *proxy_pass* to this named location inside my
x-accel-redirect section (the second location block below), but it does not
work for me. Could you give some example or instruction how to achieve
this in my nginx config file? Or should I apply a pitch to fix this issue
formally?

upstream file_server {
server ***.***.***.***:8888;
server ***.***.***.***:8888;
}

server {
.....................
# This accepts file upload/download requests and passes the requests to
my tomcat web server that handles authentication
location /api/v1/files {
proxy_pass http://tomcat;
proxy_cache backcache;
}

# This is the internal uri path that the tomcat web server redirects to
after authentication
location ~ ^/(all|groups|channels|users) {
internal;
proxy_pass http://file_server; # This is my file server. I tried
make this a named location, but didn't not work.
}
.......................
}

Thanks a lot and best regards,

- Yong
Y&R Computing
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

POST method with x-accel-redirect

yonglipa December 06, 2016 12:02AM

Re: POST method with x-accel-redirect

Francis Daly December 06, 2016 03:48PM

Re: POST method with x-accel-redirect

yonglipa December 06, 2016 04:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 279
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