# Is there setting equivalent to proxy\_set\_header for uwsgi?

**URL:** <https://www.ruby-forum.com/t/is-there-setting-equivalent-to-proxy-set-header-for-uwsgi/210778>\
**Category:** NGINX\
**Created:** [August 17, 2011, 5:11am UTC](https://www.ruby-forum.com/t/is-there-setting-equivalent-to-proxy-set-header-for-uwsgi/210778 "2011-08-17T05:11:30Z")\
**Posts on this page:** 4\
**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:** [August 17, 2011, 5:11am UTC](https://www.ruby-forum.com/t/is-there-setting-equivalent-to-proxy-set-header-for-uwsgi/210778/1 "2011-08-17T05:11:30Z")

</div>

I tried use uwsgi\_params, but the uwsgi server will fail to pass it.

Posted at Nginx Forum:

> **[Is there setting equivalent to proxy\_set\_header for uwsgi?](https://forum.nginx.org/read.php?2,213906,213906#msg-213906)**
>
> I tried use uwsgi\_params, but the uwsgi server will fail to pass it.

---

<div class="post-metadata">

**Author:** ![yejun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a88e57/32.png) [@yejun](https://www.ruby-forum.com/u/yejun)\
**Post date:** [August 17, 2011, 6:51am UTC](https://www.ruby-forum.com/t/is-there-setting-equivalent-to-proxy-set-header-for-uwsgi/210778/2 "2011-08-17T06:51:36Z")

</div>

Il giorno 17/ago/2011, alle ore 05:10, yejun ha scritto:

> I tried use uwsgi\_params, but the uwsgi server will fail to pass it.

The directive is

uwsgi\_param KEY VALUE;

You have to put them under a location stanza:

location / {  
include uwsgi\_params;  
uwsgi\_param FOO bar;  
uwsgi\_param fookey fooval;  
uwsgi\_pass 127.0.0.1:3031;  
}

They will be blindly put in your app request dictionary.

–  
Roberto De Ioris

> **[unbit - Overview](https://github.com/unbit)**
>
> makers of uWSGI and many more open source projects - unbit

JID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![yejun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a88e57/32.png) [@yejun](https://www.ruby-forum.com/u/yejun)\
**Post date:** [August 17, 2011, 6:59am UTC](https://www.ruby-forum.com/t/is-there-setting-equivalent-to-proxy-set-header-for-uwsgi/210778/3 "2011-08-17T06:59:01Z")

</div>

I have tried this. The uwsgi server gives an error

INVALID PROTOCOL:  
[pid: 32149|app: 0|req: -1/1] () {22 vars in 803 bytes} [Wed Aug 17  
00:54:50 2011] =\> generated 45 bytes in 0 msecs ( 500) 2 headers in 63  
bytes (0 switches on core 0)

My uwsgi is a django app, the command line looks like this

uwsgi --uid 1000 -H /mnt/python -s :8000 --wsgi-file  
path/wsgi\_handler.py

Without uwsgi\_param, this works perfectly.

Posted at Nginx Forum:

> **[Re: Is there setting equivalent to proxy\_set\_header for uwsgi?](https://forum.nginx.org/read.php?2,213906,213908#msg-213908)**
>
> I tried use uwsgi\_params, but the uwsgi server will fail to pass it.

---

<div class="post-metadata">

**Author:** ![yejun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/y/a88e57/32.png) [@yejun](https://www.ruby-forum.com/u/yejun)\
**Post date:** [August 17, 2011, 7:28am UTC](https://www.ruby-forum.com/t/is-there-setting-equivalent-to-proxy-set-header-for-uwsgi/210778/4 "2011-08-17T07:28:46Z")

</div>

Il giorno 17/ago/2011, alle ore 06:58, yejun ha scritto:

> uwsgi --uid 1000 -H /mnt/python -s :8000 --wsgi-file  
> path/wsgi\_handler.py
> 
> Without uwsgi\_param, this works perfectly.
> 
> Posted at Nginx Forum:  
> [http://forum.nginx.org/read.php?2,213906,213908#msg-213908](http://forum.nginx.org/read.php?2,213906,213908#msg-213908)

## You should post your current nginx config, otherwise it will be very hard to help you 🙂

Roberto De Ioris

> **[unbit - Overview](https://github.com/unbit)**
>
> makers of uWSGI and many more open source projects - unbit

JID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
