# How to add an arg to the requests to the upstreams

**URL:** <https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403>\
**Category:** NGINX\
**Created:** [May 25, 2011, 11:48am UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403 "2011-05-25T11:48:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [May 25, 2011, 11:48am UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403/1 "2011-05-25T11:48:44Z")

</div>

Hey, I wanna add a custom arg to the upstreams by proxy\_pass like this:

upstream servers {  
server1:8011;  
server2:8012;  
}

…  
server {  
listen on 8443;  
ssl on;  
server\_name server0;  
location / {  
proxy\_pass [https://servers](https://servers);  
}  
}

My expectation: type “[https://server0:8443](https://server0:8443)” and the upstream will get  
“[https://server1:8011?abc=1](https://server1:8011?abc=1)”

So how can I make this? Thanks.

Posted at Nginx Forum:

> **[How to add an arg to the requests to the upstreams](https://forum.nginx.org/read.php?2,200661,200661#msg-200661)**
>
> Hey, I wanna add a custom arg to the upstreams by proxy\_pass like this: upstream servers { server1:8011; server2:8012; } ... server { listen on 8443; ssl on; server\_name server0; location / {

---

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [May 25, 2011, 11:54am UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403/2 "2011-05-25T11:54:54Z")

</div>

On Wed, May 25, 2011 at 05:48:26AM -0400, speedfirst wrote:

> ssl on;  
> So how can I make this? Thanks.  
> proxy\_pass [https://servers$uri?abc=1](https://servers$uri?abc=1);

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [May 25, 2011, 12:12pm UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403/3 "2011-05-25T12:12:52Z")

</div>

Is direct pass OK, like this?

proxy\_pass [https://servers?abc=1](https://servers?abc=1)

Posted at Nginx Forum:

> **[Re: How to add an arg to the requests to the upstreams](https://forum.nginx.org/read.php?2,200661,200666#msg-200666)**
>
> Hey, I wanna add a custom arg to the upstreams by proxy\_pass like this: upstream servers { server1:8011; server2:8012; } ... server { listen on 8443; ssl on; server\_name server0; location / {

---

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [May 25, 2011, 12:25pm UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403/4 "2011-05-25T12:25:55Z")

</div>

On Wed, May 25, 2011 at 06:12:03AM -0400, speedfirst wrote:

> Is direct pass OK, like this?
> 
> proxy\_pass [https://servers?abc=1](https://servers?abc=1)

No.

–  
Igor S.

---

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [May 26, 2011, 12:28am UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403/5 "2011-05-26T00:28:48Z")

</div>

sorry, ignore the last pst.

Posted at Nginx Forum:

> **[Re: How to add an arg to the requests to the upstreams](https://forum.nginx.org/read.php?2,200661,200924#msg-200924)**
>
> Hey, I wanna add a custom arg to the upstreams by proxy\_pass like this: upstream servers { server1:8011; server2:8012; } ... server { listen on 8443; ssl on; server\_name server0; location / {

---

<div class="post-metadata">

**Author:** ![speedfirst](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e19adc/32.png) [@speedfirst](https://www.ruby-forum.com/u/speedfirst)\
**Post date:** [May 26, 2011, 12:24am UTC](https://www.ruby-forum.com/t/how-to-add-an-arg-to-the-requests-to-the-upstreams/207403/6 "2011-05-26T00:24:29Z")

</div>

So how to do that? Thanks.

Posted at Nginx Forum:

> **[Re: How to add an arg to the requests to the upstreams](https://forum.nginx.org/read.php?2,200661,200920#msg-200920)**
>
> Hey, I wanna add a custom arg to the upstreams by proxy\_pass like this: upstream servers { server1:8011; server2:8012; } ... server { listen on 8443; ssl on; server\_name server0; location / {
