How to set multiple params in Nginx proxy_pass

The name of the pictureThe name of the pictureThe name of the pictureClash 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?










share|improve this question

















  • 1




    You need to use a ~ if this is a regular expression location. See this link.
    – Richard Smith
    Oct 2 '17 at 10:53














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?










share|improve this question

















  • 1




    You need to use a ~ if this is a regular expression location. See this link.
    – Richard Smith
    Oct 2 '17 at 10:53












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?










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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












  • 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















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















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



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














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













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?