Setup uWSGI as webserver with pyramid (no NGINX) -


most of available tutorials show how set uwsgi upstream http server (like nginx). uwsgi alone can act beautifully router/proxy/load-balancer - refer this project, didn't want setup nginx @ moment started off exploring option of serving webpages through uwsgi. answer here shows how set pyramid.

i using pyramid_mongodb scaffold, have modified working on python3. see here details. assuming have pyramid project (created pcreate -s pyramid_mongodb myproject). here uwsgi configurations needed in development/production.ini

[uwsgi] http = 0.0.0.0:8080 #http-to /tmp/uwsgi.sock - use standalone mode #socket = :9050 master = true  processes = 2  harakiri = 60 harakiri-verbose = true limit-post = 65536 post-buffering = 8192  daemonize = ./uwsgi.log pidfile = ./orange_uwsgi.pid  listen = 128   max-requests = 1000  reload-on-as = 128  reload-on-rss = 96 no-orphans = true  #logto= <log file> log-slow = true  virtualenv = <path virtual environment>  #file = /path/to/pyramid.wsgi #callable = application  need-app = true 

also since using uwsgi can comment out server portion ini

#[server:main] #use = egg:waitress#main #host = 0.0.0.0 #port = 6544 

to run server use uwsgi --ini-paste development.ini


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -