How to set multiple params in Nginx proxy_pass
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am trying to set a set a difficult proxy pass within Nginx. The URL itself requires a bunch id's and then has a query string at the end.
location /api/v1/schools/(.*)/courses/(.*)/years/(.*)/api_end_point/(.*)
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host some-cool-api.test.io;
proxy_pass https://10.0.0.2/$1$is_args$args;
I tried the above but it's not matching the route
here is an example of what the URL will look like:
"/api/v1/schools/51/courses/231/years/3595/api_end_point?thing_1=0&thing2=0&thing_3=0&thing_4=0&thing_5=0&thing_6=0&thig_7=11250&thing_8=0"
Any idea's on how to do the above?
proxy nginx
add a comment |Â
up vote
0
down vote
favorite
I am trying to set a set a difficult proxy pass within Nginx. The URL itself requires a bunch id's and then has a query string at the end.
location /api/v1/schools/(.*)/courses/(.*)/years/(.*)/api_end_point/(.*)
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host some-cool-api.test.io;
proxy_pass https://10.0.0.2/$1$is_args$args;
I tried the above but it's not matching the route
here is an example of what the URL will look like:
"/api/v1/schools/51/courses/231/years/3595/api_end_point?thing_1=0&thing2=0&thing_3=0&thing_4=0&thing_5=0&thing_6=0&thig_7=11250&thing_8=0"
Any idea's on how to do the above?
proxy nginx
1
You need to use a~
if this is a regular expression location. See this link.
â Richard Smith
Oct 2 '17 at 10:53
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am trying to set a set a difficult proxy pass within Nginx. The URL itself requires a bunch id's and then has a query string at the end.
location /api/v1/schools/(.*)/courses/(.*)/years/(.*)/api_end_point/(.*)
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host some-cool-api.test.io;
proxy_pass https://10.0.0.2/$1$is_args$args;
I tried the above but it's not matching the route
here is an example of what the URL will look like:
"/api/v1/schools/51/courses/231/years/3595/api_end_point?thing_1=0&thing2=0&thing_3=0&thing_4=0&thing_5=0&thing_6=0&thig_7=11250&thing_8=0"
Any idea's on how to do the above?
proxy nginx
I am trying to set a set a difficult proxy pass within Nginx. The URL itself requires a bunch id's and then has a query string at the end.
location /api/v1/schools/(.*)/courses/(.*)/years/(.*)/api_end_point/(.*)
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host some-cool-api.test.io;
proxy_pass https://10.0.0.2/$1$is_args$args;
I tried the above but it's not matching the route
here is an example of what the URL will look like:
"/api/v1/schools/51/courses/231/years/3595/api_end_point?thing_1=0&thing2=0&thing_3=0&thing_4=0&thing_5=0&thing_6=0&thig_7=11250&thing_8=0"
Any idea's on how to do the above?
proxy nginx
proxy nginx
asked Oct 2 '17 at 9:46
TheLegend
1,4473914
1,4473914
1
You need to use a~
if this is a regular expression location. See this link.
â Richard Smith
Oct 2 '17 at 10:53
add a comment |Â
1
You need to use a~
if this is a regular expression location. See this link.
â Richard Smith
Oct 2 '17 at 10:53
1
1
You need to use a
~
if this is a regular expression location. See this link.â Richard Smith
Oct 2 '17 at 10:53
You need to use a
~
if this is a regular expression location. See this link.â Richard Smith
Oct 2 '17 at 10:53
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f395611%2fhow-to-set-multiple-params-in-nginx-proxy-pass%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
You need to use a
~
if this is a regular expression location. See this link.â Richard Smith
Oct 2 '17 at 10:53