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

I've been trying to figure out how to propertly utilize uWSGI with Nginx and have hit a bit of a design roadblock. I'm trying to figure out how my python files should be accessed via uWSGI. I've been able to find 3 different ways to do so:

  1. Create a uWSGI process for each python file and then create locations in nginx that pass to each uWSGI process.
  2. Create one instance of uWSGI and create a master python file that handles all the different requests.
  3. Create one instance of uWSGI and setup dynamic applications

I'm coming from LightTPD where I simply setup rewrites to point at the different python files. I feel like 3 is the closest to that but uWSGI says that it is not the recommended way of going about it.

share|improve this question

1 Answer 1

I think you are confusing the WSGI (not uWSGI that is an implementation of WSGI) way of running webapps with the old-style CGI approach you are using with lighttpd. If you have written your app as a series of CGI scripts, you have to use uWSGI with the CGI plugin. (Nginx has no CGI support.)

At the end of the plugin page you will even find an accelerator for python cgi scripts.

By the way, I have to tell you that this way of running webapps (independently from the webserver) is really the most slow and inefficient one. But if you were satisfied with lighttpd you should have no problems with nginx+uWSGI.

share|improve this answer
Do you know of any docs on the difference in approach? In particular how the app should be organized? I understand that the old way of running CGI scripts is slow, hence my desire to move towards the new way of running uWSGI. –  user133507 Aug 26 '12 at 17:29

Your Answer


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.