Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Question:

Is there a way to use uWSGI as a proxy server?

More about the system:

  • 6 load-balanced nginix/uWSGI servers
  • Python

Requirements:

  • Set up a few proxy servers that can:
    • Accept requests from a client browser
    • Read and modify request URL
    • Read and modify request headers
    • Forward request to another proxy server

The reason we would like to use uWSGI as the proxy server is because we are already using uWSGI with the application and all of our Python code will work it.

Right now, we use uWSGI to serve a RESTful http API with Python on the back end. As I understand it, a proxy server works differently than the REST API would.

Please forgive my ignorance, I know very little about proxy servers and how they work. I also realize that these requirements sound totally wacky, but I assure you, there is a rhyme and reason to it.

Thanks so much!

share|improve this question
add comment

1 Answer

uWSGI has a meta-language for manipulating request and response:

http://uwsgi-docs.readthedocs.org/en/latest/InternalRouting.html

check the "http" instruction.

This system allows really funny things, like advanced caching:

https://github.com/unbit/uwsgi-docs/blob/master/tutorials/CachingCookbook.rst

In the newer versions lot of improvements have been added so you may want to check 1.9.x changelogs too here: https://github.com/unbit/uwsgi-docs/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.