Most of the available tutorials show how to set up uWSGI with an upstream HTTP server (like NGINX). But uWSGI alone can act beautifully as router/proxy/load-balancer - refer this For my project, I didn't want to setup NGINX at this moment so I started off exploring the option of serving webpages through uWSGI. The answer here shows how to set it up with Pyramid.
相关问题
- Why is `node.js` dying when called from inside pyt
- django app under uwsgi failing to start when using
- Pyramid on App Engine gets "InvalidResponseError:
- Why does multiprocessing work on Django runserver
- uWSGI set configuration depending on environment v
相关文章
- What is the proper way to insert an object with a
- unable to load configuration from uwsgi
- What is uWSGI master mode?
- SQLAlchemy StaleDataError on deleting items insert
- Python pyramid - How to use checkboxes and radio b
- uwsgi cannot find Flask application: (callable not
- Rolling back database transactions in SQLAlchemy t
- Large file downloads in cherrypy
I am using pyramid_mongodb scaffold, which I have modified to get it working on python3. See here for details. Assuming that we have a Pyramid project (created with
pcreate -s pyramid_mongodb MyProject
). Here are the uWSGI configurations needed in development/production.iniAlso since we are using uWSGI we can comment out
server
portion from the iniTo run the server use
uwsgi --ini-paste development.ini
Much more easier! No need to modify at all the "development.ini" file. Create in the App folder where your "development" and "production" ini files reside, a file called "wsgi.app" with the following content:
create let's say "myapp.conf" with it's content:
and the NGINX configuation is very simple: