I want to proxy the incoming requests with an nginx instance to a little java backend application. The idea is that I want every original request's uri to be included as a request parameter i.e. something like:
location / {
proxy_pass http://localhost:9000?url=$request_uri;
}
but it does not work
location / {
proxy_pass http://localhost:9000$request_uri;
}
The @request_uri
is equal to the original request URI as received from the client including the args.
The $request_uri
of this post is /questions/16188521/how-do-i-include-the-original-url-as-a-request-parameter-when-proxying
.
see http://wiki.nginx.org/HttpCoreModule#.24request_uri
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With