Tag: uwsgi

How to pass environment variables to uwsgi from cherokee

Programming

Today i’ve faced an issue with cherokee + uwsgi. I had to deploy a webapp which needed the LD_LIBRARY_PATH set. After fighting a while with cherokee i found a way to accomplish it.
From cherokee just invoke uwsgi interpreter as follow:

/bin/bash -c "LD_LIBRARY_PATH=/usr/local/MATLAB/R2011a/bin/glnxa64 /usr/local/bin/uwsgi --ini-paste /var/www/whisperer/development.ini"

The trick is to start a bash, set the variable(s) u want in your webapp and then start uwsgi. handy, isn’t it ?

Hope this helps somehow…

Install uwsgi on ubuntu 11.10 oneiric, 10.10 and ubuntu 11.04 natty

Codingubuntu

UPDATE: it also works for ubuntu 11.04 natty!

In these days i’m experimenting with Cherokee webserver and pylons applications deployed via wsgi. I’ve seen that uwsgi which is the preferred way to deploy a python app on cherokee is not packaged on Ubuntu 10.10. Here is how you can get the latest uwsgi on your server.


sudo apt-get install libxml2-dev python-pip python2.6-dev

sudo pip install http://projects.unbit.it/downloads/uwsgi-latest.tar.gz

For ubuntu 11.10 oneiric do:


sudo apt-get install libxml2-dev python-pip python2.7-dev

sudo pip install http://projects.unbit.it/downloads/uwsgi-latest.tar.gz

That’s all. you have now uwsgi in your path ready to be used by cherokee or any other webserver (ngnix maybe) ?

Hope this helps 🙂

%d bloggers like this: